| 1 | |
|---|
| 2 | from mantid.simpleapi import * |
|---|
| 3 | from isis_reflectometry import quick |
|---|
| 4 | reload(quick) |
|---|
| 5 | |
|---|
| 6 | class ReflectometryQuick(object): |
|---|
| 7 | |
|---|
| 8 | def runTest(self): |
|---|
| 9 | |
|---|
| 10 | config['default.instrument'] = 'INTER' |
|---|
| 11 | LoadISISNexus(Filename='13463', OutputWorkspace='13463') |
|---|
| 12 | LoadISISNexus(Filename='13464', OutputWorkspace='13464') |
|---|
| 13 | LoadISISNexus(Filename='13460', OutputWorkspace='13460') |
|---|
| 14 | |
|---|
| 15 | transmissionRuns = '13463,13464' |
|---|
| 16 | runNo = '13460' |
|---|
| 17 | incidentAngle = 0.7 |
|---|
| 18 | |
|---|
| 19 | # Part 1. Create Transmission runs implicitly as well as performing conversion. |
|---|
| 20 | quick.quick(runNo, trans=transmissionRuns) |
|---|
| 21 | implicit = mtd['13460_IvsLam'].clone() |
|---|
| 22 | |
|---|
| 23 | # Part 2a. Create the transmission run alone. |
|---|
| 24 | transmission = CreateTransmissionWorkspace(WavelengthMin=1.0, WavelengthMax=17.0, WavelengthStep=0.05, MonitorBackgroundWavelengthMin=15.0, |
|---|
| 25 | MonitorBackgroundWavelengthMax=17.0, I0MonitorIndex=2, MonitorIntegrationWavelengthMin=4.0, MonitorIntegrationWavelengthMax=10.0, |
|---|
| 26 | WorkspaceIndexList=[3,4], Params=[1.5, 0.02, 17], StartOverlap=10.0, EndOverlap=12.0, FirstTransmissionRun='13463', SecondTransmissionRun='13464') |
|---|
| 27 | |
|---|
| 28 | # Part 2b. Use the transmission run in quick. |
|---|
| 29 | quick.quick(runNo, trans=transmission) |
|---|
| 30 | explicit = mtd['13460_IvsLam'].clone() |
|---|
| 31 | |
|---|
| 32 | # Part 3. Compare results |
|---|
| 33 | plotSpectrum([implicit, explicit], [0]) |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | test = ReflectometryQuick() |
|---|
| 38 | test.runTest() |
|---|
| 39 | |
|---|
| 40 | |
|---|