def test_absorber_tof(self): # D33 VTOF # actually this is a container run, not an absorber, but is fine for this test SANSILLReduction(Run='093409', ProcessAs='Absorber', OutputWorkspace='absorber') self._check_output(mtd['absorber'], True, 30, 256 * 256 + 2) self._check_process_flag(mtd['absorber'], 'Absorber')
def test_reference_tof(self): # D33 VTOF # this is actually a sample run, not water, but is fine for this test SANSILLReduction(Run='093410', ProcessAs='Reference', OutputWorkspace='ref') self._check_output(mtd['ref'], True, 30, 256 * 256) self._check_process_flag(mtd['ref'], 'Reference')
def test_tof(self): # D33 VTOF SANSILLReduction(Run='093410', ProcessAs='Sample', OutputWorkspace='sample') # TOF resolution is not yet implemented SANSILLIntegration(InputWorkspace='sample', OutputWorkspace='iq') self._check_output(mtd['iq']) self.assertEqual(mtd['iq'].blocksize(), 217)
def setUp(self): self._facility = config['default.facility'] self._data_search_dirs = config.getDataSearchDirs() config.appendDataSearchSubDir('ILL/D11/') config.appendDataSearchSubDir('ILL/D33/') config.setFacility("ILL") SANSILLReduction(Run='010569', ProcessAs='Sample', OutputWorkspace='sample')
def test_beam(self): SANSILLReduction(Run='010414', ProcessAs='Beam', OutputWorkspace='Db') self._check_output(mtd['Db'], True, 1, 128*128) self._check_process_flag(mtd['Db'], 'Beam') run = mtd['Db'].getRun() self.assertAlmostEqual(run.getLogData('BeamCenterX').value, -0.0048, delta=1e-4) self.assertAlmostEqual(run.getLogData('BeamCenterY').value, -0.0027, delta=1e-4) self.assertAlmostEqual(run.getLogData('BeamFluxValue').value, 6628249, delta=1) self.assertAlmostEqual(run.getLogData('BeamFluxError').value, 8566, delta=1)
def test_reference(self): SANSILLReduction(Run='010453', ProcessAs='Reference', SensitivityOutputWorkspace='sens', OutputWorkspace='water') self._check_output(mtd['water'], True, 1, 128 * 128) self._check_output(mtd['sens'], False, 1, 128 * 128) self._check_process_flag(mtd['water'], 'Reference') self._check_process_flag(mtd['sens'], 'Sensitivity')
def test_sample_thickness(self): SANSILLReduction(Run='010569', ProcessAs='Sample', SampleThickness=-1, OutputWorkspace='sample', Version=1) a = mtd["sample"].getHistory().lastAlgorithm() thickness = a.getProperty("SampleThickness").value self.assertEqual(thickness, 0.1)
def test_beam_tof(self): # D33 VTOF SANSILLReduction(Run='093406', ProcessAs='Beam', OutputWorkspace='beam', FluxOutputWorkspace='flux') self._check_output(mtd['beam'], True, 30, 256*256+2) self._check_process_flag(mtd['beam'], 'Beam') run = mtd['beam'].getRun() self.assertAlmostEqual(run.getLogData('BeamCenterX').value, 0.0025, delta=1e-4) self.assertAlmostEqual(run.getLogData('BeamCenterY').value, 0.0009, delta=1e-4) self._check_output(mtd['flux'], False, 30, 256*256+2) self._check_process_flag(mtd['flux'], 'Beam')
def test_water(self): SANSILLReduction(Runs='010453', ProcessAs='Water', OutputSensitivityWorkspace='sens', OutputWorkspace='water', NormaliseBy='Monitor') self._check_output(mtd['water'], 1, 128 * 128 + 2) self._check_output(mtd['sens'], 1, 128 * 128 + 2) self._check_process_flag(mtd['water'], 'Water') self._check_process_flag(mtd['sens'], 'Water')
def test_beam(self): SANSILLReduction(Run='010414', ProcessAs='Beam', OutputWorkspace='Db', FluxOutputWorkspace='Fl') self._check_output(mtd['Db'], True, 1, 128*128+2) self._check_process_flag(mtd['Db'], 'Beam') run = mtd['Db'].getRun() self.assertAlmostEqual(run.getLogData('BeamCenterX').value, 0.0048, delta=1e-4) self.assertAlmostEqual(run.getLogData('BeamCenterY').value, -0.0027, delta=1e-4) self._check_output(mtd['Fl'], False, 1, 128*128+2) self._check_process_flag(mtd['Fl'], 'Beam') self.assertAlmostEqual(mtd['Fl'].readY(0)[0], 6628249, delta=1) self.assertAlmostEqual(mtd['Fl'].readE(0)[0], 8566, delta=1)
def test_empty_beam(self): SANSILLReduction(Runs='010414', ProcessAs='EmptyBeam', OutputWorkspace='eb', OutputFluxWorkspace='fl', NormaliseBy='Monitor') self._check_output(mtd['eb'], 1, 128 * 128 + 2) self._check_process_flag(mtd['eb'], 'EmptyBeam') run = mtd['eb'].getRun() self.assertAlmostEqual(run.getLogData('BeamCenterX').value, 0.0048, delta=1e-4) self.assertAlmostEqual(run.getLogData('BeamCenterY').value, -0.0027, delta=1e-4) self._check_output(mtd['fl'], 1, 1) self._check_process_flag(mtd['fl'], 'EmptyBeam') self.assertAlmostEqual(mtd['fl'].readY(0)[0], 738.538, delta=1e-3) self.assertAlmostEqual(mtd['fl'].readE(0)[0], 0.957, delta=1e-3)
def test_sample(self): SANSILLReduction(Run='010569', ProcessAs='Sample', OutputWorkspace='sample') self._check_output(mtd['sample'], True, 1, 128*128+2) self._check_process_flag(mtd['sample'], 'Sample')
def test_container(self): SANSILLReduction(Run='010460', ProcessAs='Container', OutputWorkspace='can') self._check_output(mtd['can'], True, 1, 128*128+2) self._check_process_flag(mtd['can'], 'Container')
def test_transmission(self): SANSILLReduction(Run='010414', ProcessAs='Beam', OutputWorkspace='Db') SANSILLReduction(Run='010585', ProcessAs='Transmission', BeamInputWorkspace='Db', OutputWorkspace='Tr') self.assertAlmostEqual(mtd['Tr'].readY(0)[0], 0.642, delta=1e-3) self.assertAlmostEqual(mtd['Tr'].readE(0)[0], 0.0019, delta=1e-4) self._check_process_flag(mtd['Tr'], 'Transmission')
def test_absorber(self): SANSILLReduction(Run='010462', ProcessAs='Absorber', OutputWorkspace='Cd') self._check_output(mtd['Cd'], True, 1, 128*128+2) self._check_process_flag(mtd['Cd'], 'Absorber')
def test_sample_tof(self): # D33 VTOF, Pluronic F127 SANSILLReduction(Run='093410', ProcessAs='Sample', OutputWorkspace='sample') self._check_output(mtd['sample'], True, 30, 256*256+2) self._check_process_flag(mtd['sample'], 'Sample')
def test_container_tof(self): # D33 VTOF SANSILLReduction(Run='093409', ProcessAs='Container', OutputWorkspace='can') self._check_output(mtd['can'], True, 30, 256*256) self._check_process_flag(mtd['can'], 'Container')
def test_transmission_tof(self): # D33 VTOF SANSILLReduction(Run='093406', ProcessAs='Beam', OutputWorkspace='beam') SANSILLReduction(Run='093407', ProcessAs='Transmission', BeamInputWorkspace='beam', OutputWorkspace='ctr') self._check_output(mtd['ctr'], False, 97, 1)
def setUp(self): self._facility = config['default.facility'] config.appendDataSearchSubDir('ILL/D11/') config.appendDataSearchSubDir('ILL/D33/') config['default.facility'] = 'ILL' SANSILLReduction(Run='010569', ProcessAs='Sample', OutputWorkspace='sample')