1 | applyDeadTimeCorr = False |
---|
2 | |
---|
3 | prefix = "/home/hgb24396/Mantid/Develop/Source/Test/AutoTestData/MUSR000" |
---|
4 | |
---|
5 | start = 15189 |
---|
6 | end = 15199 |
---|
7 | |
---|
8 | result = WorkspaceFactory.create("Workspace2D", 1, end - start + 1, end - start + 1) |
---|
9 | |
---|
10 | mtd.remove("script_result") |
---|
11 | mtd.add("script_result", result) |
---|
12 | |
---|
13 | for run_no in range(start,end+1): |
---|
14 | # Load the file |
---|
15 | file = prefix + str(run_no) + ".nxs" |
---|
16 | loaded = LoadMuonNexus(file, AutoGroup=False) |
---|
17 | |
---|
18 | # Apply dead time correction |
---|
19 | if applyDeadTimeCorr: |
---|
20 | loaded = ApplyDeadTimeCorr("loaded", "dead_times") |
---|
21 | |
---|
22 | # Apply auto-grouping |
---|
23 | loaded = ApplyGroupingFromMuonNexus("loaded", file) |
---|
24 | |
---|
25 | # Integrate the values |
---|
26 | loaded = Integration("loaded") |
---|
27 | |
---|
28 | # Calculate and print assymetry |
---|
29 | loaded = AsymmetryCalc("loaded") |
---|
30 | |
---|
31 | # Get first period |
---|
32 | first = loaded.getItem(0) |
---|
33 | |
---|
34 | # Set result value |
---|
35 | result.dataY(0)[run_no - start] = first.readY(0)[0] |
---|
36 | result.dataX(0)[run_no - start] = run_no |
---|