| 1 | LoadNexusProcessed(Filename=r'PG3_11485_Fitted.nxs',OutputWorkspace='PG3_11485') |
|---|
| 2 | LoadNexusProcessed(Filename=r'braggpeaks.nxs',OutputWorkspace='PG3_11485_Peak') |
|---|
| 3 | |
|---|
| 4 | ProcessBackground( |
|---|
| 5 | InputWorkspace = 'PG3_11485', |
|---|
| 6 | WorkspaceIndex = 0, |
|---|
| 7 | OutputWorkspace= 'PG3_11485_Bkgd', |
|---|
| 8 | Options='RemovePeaks', |
|---|
| 9 | BraggPeakTableWorkspace='PG3_11485_Peak', |
|---|
| 10 | NumberOfFWHM = 2.0, |
|---|
| 11 | UserBackgroundWorkspace = "dummy") |
|---|
| 12 | |
|---|
| 13 | startx = 7730. |
|---|
| 14 | endx = 49000. |
|---|
| 15 | |
|---|
| 16 | functionstr = "name=%s,n=%d, EndX=%f, StartX=%f" % ("Chebyshev", 12, endx, startx) |
|---|
| 17 | for iborder in xrange(13): |
|---|
| 18 | functionstr = "%s,A%d=%.5f" % (functionstr, iborder, 0.0) |
|---|
| 19 | Fit( |
|---|
| 20 | Function = functionstr, |
|---|
| 21 | InputWorkspace = 'PG3_11485_Bkgd', |
|---|
| 22 | Output = 'PG3_11485_FitBkgd', |
|---|
| 23 | MaxIterations = '1000', |
|---|
| 24 | Minimizer = 'Levenberg-MarquardtMD', |
|---|
| 25 | CreateOutput = '1', |
|---|
| 26 | StartX = startx, |
|---|
| 27 | EndX = endx) |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|