1 | # determine where to save |
---|
2 | import os |
---|
3 | savedir = os.path.abspath(os.path.curdir) |
---|
4 | |
---|
5 | LoadEventNexus(Filename="PG3_4866_event.nxs", |
---|
6 | OutputWorkspace="PG3_4866", |
---|
7 | Precount=True) |
---|
8 | FilterBadPulses(InputWorkspace="PG3_4866", |
---|
9 | OutputWorkspace="PG3_4866") |
---|
10 | RemovePromptPulse(InputWorkspace="PG3_4866", |
---|
11 | OutputWorkspace="PG3_4866", |
---|
12 | Width=50) |
---|
13 | CompressEvents(InputWorkspace="PG3_4866", |
---|
14 | OutputWorkspace="PG3_4866", |
---|
15 | Tolerance=0.01) |
---|
16 | SortEvents(InputWorkspace="PG3_4866") |
---|
17 | CropWorkspace(InputWorkspace="PG3_4866", |
---|
18 | OutputWorkspace="PG3_4866", |
---|
19 | XMax=16666.669999999998) |
---|
20 | LoadCalFile(InputWorkspace="PG3_4866", |
---|
21 | CalFilename="PG3_FERNS_d4832_2011_08_24.cal", |
---|
22 | WorkspaceName="PG3") |
---|
23 | MaskDetectors(Workspace="PG3_4866", |
---|
24 | MaskedWorkspace="PG3_mask") |
---|
25 | AlignDetectors(InputWorkspace="PG3_4866", |
---|
26 | OutputWorkspace="PG3_4866", |
---|
27 | OffsetsWorkspace="PG3_offsets") |
---|
28 | ConvertUnits(InputWorkspace="PG3_4866", |
---|
29 | OutputWorkspace="PG3_4866", |
---|
30 | Target="TOF") |
---|
31 | UnwrapSNS(InputWorkspace="PG3_4866", |
---|
32 | OutputWorkspace="PG3_4866", |
---|
33 | LRef=62) |
---|
34 | RemoveLowResTOF(InputWorkspace="PG3_4866", |
---|
35 | OutputWorkspace="PG3_4866", |
---|
36 | ReferenceDIFC=1500) |
---|
37 | ConvertUnits(InputWorkspace="PG3_4866", |
---|
38 | OutputWorkspace="PG3_4866", |
---|
39 | Target="dSpacing") |
---|
40 | Rebin(InputWorkspace="PG3_4866", |
---|
41 | OutputWorkspace="PG3_4866", |
---|
42 | Params=(0.1,-0.0004,2.2)) |
---|
43 | SortEvents(InputWorkspace="PG3_4866") |
---|
44 | DiffractionFocussing(InputWorkspace="PG3_4866", |
---|
45 | OutputWorkspace="PG3_4866", |
---|
46 | GroupingWorkspace="PG3_group") |
---|
47 | EditInstrumentGeometry(Workspace="PG3_4866", |
---|
48 | PrimaryFlightPath=60, |
---|
49 | SpectrumIDs=[1], |
---|
50 | L2=[3.2208], |
---|
51 | Polar=[90.8074], |
---|
52 | Azimuthal=[0]) |
---|
53 | ConvertUnits(InputWorkspace="PG3_4866", |
---|
54 | OutputWorkspace="PG3_4866", |
---|
55 | Target="TOF") |
---|
56 | Rebin(InputWorkspace="PG3_4866", |
---|
57 | OutputWorkspace="PG3_4866", |
---|
58 | Params=[-0.0004]) |
---|
59 | ConvertUnits(InputWorkspace="PG3_4866", |
---|
60 | OutputWorkspace="PG3_4866", |
---|
61 | Target="dSpacing") |
---|
62 | |
---|
63 | |
---|
64 | FindPeaks(InputWorkspace = "PG3_4866", |
---|
65 | FWHM = 8, |
---|
66 | Tolerance = 4, |
---|
67 | PeakPositions = "0.5044,0.5191,0.5350,0.5526,0.5936,0.6178,0.6453,0.6768,0.7134,0.7566,0.8089,0.8737,0.9571,1.0701,1.2356,1.5133,2.1401", |
---|
68 | PeakFunctions = "Gaussian", |
---|
69 | BackgroundFunction = "Quadratic", |
---|
70 | HighBackground = True, |
---|
71 | PeakPositionTolerance = 0.05, |
---|
72 | PeakList = "FoundPeakTable", |
---|
73 | RawPeakParameters = True) |
---|