def test_that_a_basic_reduction_will_result_in_an_output_group_containing_a_workspace_with_the_correct_name(self): workspace = ISISIndirectEnergyTransferWrapper(InputFiles=['IRS26176.RAW'], Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange=[3, 53]) self.assertTrue(isinstance(workspace, WorkspaceGroup), 'Result workspace should be a workspace group.') self.assertEqual(workspace.getNames()[0], 'iris26176_graphite002_red')
def test_a_reduction_with_multiple_files_when_summing_each_of_the_runs_will_produce_a_workspace_with_the_correct_name(self): workspace = ISISIndirectEnergyTransferWrapper(InputFiles=['IRS26176.RAW', 'IRS26173.RAW'], SumFIles=True, Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange=[3, 53]) self.assertTrue(isinstance(workspace, WorkspaceGroup), 'Result workspace should be a workspace group.') self.assertEqual(len(workspace), 1) self.assertEqual(workspace.getNames()[0], 'iris26176_multi_graphite002_red')
def test_that_a_reduction_with_a_manual_efixed_will_return_a_workspace_with_the_correct_naming_and_number_of_histograms(self): workspace = ISISIndirectEnergyTransferWrapper(InputFiles=['IRS26176.RAW'], Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange=[3, 53], Efixed=1.9) self.assertTrue(isinstance(workspace, WorkspaceGroup), 'Result workspace should be a workspace group.') self.assertEqual(workspace.getNames()[0], 'iris26176_graphite002_red') red_workspace = workspace.getItem(0) self.assertEqual(red_workspace.getNumberHistograms(), 51)
def test_that_a_reduction_with_a_calibration_workspace_and_range_will_produce_a_workspace_with_the_correct_number_of_histograms(self): workspace = ISISIndirectEnergyTransferWrapper(InputFiles=['IRS26176.RAW'], Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange=[35, 40], CalibrationWorkspace=_generate_calibration_workspace('IRIS')) self.assertTrue(isinstance(workspace, WorkspaceGroup), 'Result workspace should be a workspace group.') self.assertEqual(workspace.getNames()[0], 'iris26176_graphite002_red') red_workspace = workspace.getItem(0) self.assertEqual(red_workspace.getNumberHistograms(), 6)
def test_that_a_reduction_using_a_map_file_will_produce_a_workspace_with_the_correct_number_of_histograms(self): workspace = ISISIndirectEnergyTransferWrapper(InputFiles=['OSI97919.raw'], Instrument='OSIRIS', Analyser='graphite', Reflection='002', SpectraRange=[963, 1004], GroupingMethod='File', MapFile='osi_002_14Groups.map') self.assertTrue(isinstance(workspace, WorkspaceGroup), 'Result workspace should be a workspace group.') self.assertEqual(workspace.getNames()[0], 'osiris97919_graphite002_red') red_workspace = workspace.getItem(0) self.assertEqual(red_workspace.getNumberHistograms(), 14)