def runTest(self): UseCompatibilityMode() LARMOR() Set1D() Detector("DetectorBench") MaskFile( 'USER_LARMOR_151B_LarmorTeam_80tubes_BenchRot1p4_M4_r3699.txt') Gravity(True) AddRuns(('13065', '13065'), 'LARMOR', 'nxs', lowMem=True) AssignSample('13065-add.nxs') WavRangeReduction(2, 4, DefaultTrans) # Clean up for element in AnalysisDataService.getObjectNames(): if AnalysisDataService.doesExist( element) and element != "13065p1rear_1D_2.0_4.0": AnalysisDataService.remove(element) paths = [ os.path.join(config['defaultsave.directory'], 'LARMOR00013065-add.nxs'), os.path.join(config['defaultsave.directory'], 'SANS2D00013065.log') ] # noqa for path in paths: if os.path.exists(path): os.remove(path)
def runTest(self): UseCompatibilityMode() LOQ() Detector("main-detector-bank") csv_file = FileFinder.getFullPath('batch_input.csv') Set1D() MaskFile('MASK.094AA') Gravity(True) BatchReduce(csv_file, 'raw', plotresults=False, saveAlgs={ 'SaveCanSAS1D': 'xml', 'SaveNexus': 'nxs' }) LoadNexus(Filename='54433sans.nxs', OutputWorkspace='result') Plus(LHSWorkspace='result', RHSWorkspace='99630sanotrans', OutputWorkspace='result') os.remove( os.path.join(config['defaultsave.directory'], '54433sans.nxs')) os.remove( os.path.join(config['defaultsave.directory'], '99630sanotrans.nxs')) os.remove( os.path.join(config['defaultsave.directory'], '54433sans.xml')) os.remove( os.path.join(config['defaultsave.directory'], '99630sanotrans.xml'))
def runTest(self): UseCompatibilityMode() SANS2DTUBES() MaskFile('USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt') SetDetectorOffsets('REAR', -16.0, 58.0, 0.0, 0.0, 0.0, 0.0) SetDetectorOffsets('FRONT', -44.0, -20.0, 47.0, 0.0, 1.0, 1.0) Gravity(False) Set1D() # add files (SAMPLE and CAN) time_shifts = [1] SANSadd2.add_runs(('28827', '28797'), 'SANS2DTUBES', '.nxs', rawTypes=('.add', '.raw', '.s*'), lowMem=False, saveAsEvent=True, isOverlay=True, time_shifts=time_shifts) SANSadd2.add_runs(('28823', '28793'), 'SANS2DTUBES', '.nxs', rawTypes=('.add', '.raw', '.s*'), lowMem=False, saveAsEvent=True, isOverlay=True, time_shifts=time_shifts) AssignSample(r'SANS2D00028797-add.nxs', reload=True) AssignCan(r'SANS2D00028793-add.nxs', reload=True) TransmissionSample(r'SANS2D00028808.nxs', r'SANS2D00028784.nxs') TransmissionCan(r'SANS2D00028823.nxs', r'SANS2D00028784.nxs') WavRangeReduction()
def runTest(self): UseCompatibilityMode() SANS2D() Set1D() Detector("rear-detector") MaskFile('Mask_SANS2D_091_options.toml') Gravity(True) AssignSample('5512') self.reduced = WavRangeReduction()
def runTest(self): UseCompatibilityMode() SANS2D() Set1D() Detector("rear-detector") MaskFile('MASKSANS2Doptions.091A') Gravity(True) csv_file = FileFinder.getFullPath('SANS2D_multiPeriodTests.csv') BatchReduce(csv_file, 'nxs', saveAlgs={}) self.reduced = '5512_SANS2DBatch_rear_1DPhi-45.0_45.0'
def runTest(self): pass UseCompatibilityMode() SANS2D() Set1D() Detector("rear-detector") MaskFile('MASKSANS2Doptions.091A') Gravity(True) AssignSample('5512') self.reduced = WavRangeReduction()
def runTest(self): UseCompatibilityMode() SANS2D() Set1D() Detector("rear-detector") MaskFile('MASKSANS2Doptions.091A') Gravity(True) csv_file = FileFinder.getFullPath('SANS2D_periodTests.csv') BatchReduce(csv_file, 'nxs', plotresults=False, saveAlgs={'SaveCanSAS1D': 'xml', 'SaveNexus': 'nxs'}) os.remove(os.path.join(config['defaultsave.directory'], '5512p7_SANS2DBatch_p7rear_1D_2.0_14.0Phi-45.0_45.0.xml'))
def runTest(self): UseCompatibilityMode() SANS2D() MaskFile('MASKSANS2D.091A') Gravity(True) Set1D() AssignSample('992.raw') TransmissionSample('988.raw', '987.raw') AssignCan('993.raw') TransmissionCan('989.raw', '987.raw') CompWavRanges([3, 5, 7, 11], False)
def runTest(self): UseCompatibilityMode() SANS2D() MaskFile('MASKSANS2D_094i_RKH.txt') SetDetectorOffsets('REAR', -16.0, 58.0, 0.0, 0.0, 0.0, 0.0) SetDetectorOffsets('FRONT', -44.0, -20.0, 47.0, 0.0, 1.0, 1.0) extraLength = 1 Gravity(True, extraLength) Set1D() AssignSample('2500.nxs') WavRangeReduction(4.6, 12.85, False)
def runTest(self): UseCompatibilityMode() LOQ() Set2D() Detector("main-detector-bank") MaskFile('MASK_094AA.toml') # apply some small artificial shift SetDetectorOffsets('REAR', -1.0, 1.0, 0.0, 0.0, 0.0, 0.0) Gravity(True) AssignSample('99630.RAW') # They file seems to be named wrongly. AssignCan('99631.RAW') # The file seems to be named wrongly. WavRangeReduction(None, None, False)
def runTest(self): UseCompatibilityMode() LOQ() Set1D() Detector("rear-detector") MaskFile('MASK.094AA') Gravity(False) SetCentre(324.765, 327.670) AssignSample('54431.raw') TransmissionSample('54435.raw', '54433.raw') AssignCan('54432.raw') TransmissionCan('54434.raw', '54433.raw') WavRangeReduction(3, 9, DefaultTrans)
def runTest(self): UseCompatibilityMode() SANS2D() Set1D() Detector("rear-detector") MaskFile('MASKSANS2Doptions.091A') Gravity(True) AddRuns(('5512', '5512'), 'SANS2D', 'nxs', lowMem=True) # one period of a multi-period Nexus file AssignSample('5512-add.nxs', period=7) WavRangeReduction(2, 4, DefaultTrans) paths = [os.path.join(config['defaultsave.directory'], 'SANS2D00005512-add.nxs'), os.path.join(config['defaultsave.directory'], 'SANS2D00005512.log')] for path in paths: if os.path.exists(path): os.remove(path)
def runTest(self): UseCompatibilityMode() config['default.instrument'] = 'SANS2D' SANS2D() Set1D() Detector("rear-detector") # This contains two MASKFILE commands, each resulting in a separate call to MaskDetectors. MaskFile('MaskSANS2DReductionGUI_MaskFiles.txt') Gravity(True) # This does 2 separate reductions of the same data, but saving the result of each to a different workspace. csv_file = FileFinder.getFullPath("SANS2D_mask_batch.csv") BatchReduce(csv_file, 'nxs', plotresults=False) path1 = os.path.join(config['defaultsave.directory'], 'iteration_1.xml') path2 = os.path.join(config['defaultsave.directory'], 'iteration_2.xml') if os.path.exists(path1): os.remove(path1) if os.path.exists(path2): os.remove(path2)
def runTest(self): # Select instrument and user file UseCompatibilityMode() SANS2DTUBES() MaskFile(file_name='USER_SANS2D_143ZC_2p4_4m_M4_Knowles_12mm.txt') # Setup detector positions SetDetectorOffsets(bank='REAR', x=-16.0, y=58.0, z=0.0, rot=0.0, radius=0.0, side=0.0) SetDetectorOffsets(bank='FRONT', x=-44.0, y=-20.0, z=47.0, rot=0.0, radius=1.0, side=1.0) Gravity(False) # Set the front detector fitting SetFrontDetRescaleShift(scale=1.0, shift=0.0, fitScale=True, fitShift=True) Set1D() # Assign data AssignSample(r'SANS2D00028797.nxs', reload=True) AssignCan(r'SANS2D00028793.nxs', reload=True) TransmissionSample(r'SANS2D00028808.nxs', r'SANS2D00028784.nxs') TransmissionCan(r'SANS2D00028823.nxs', r'SANS2D00028784.nxs') # Run the reduction and request FRONT and BACK to be merged WavRangeReduction(combineDet="merged")