def test_sample_corrections_only(self): """ Tests corrections for the sample only. """ corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=self._red_ws, SampleChemicalFormula='H2-O', Events=200, UseCanCorrections=False) self.assertEqual(fact.size(), 1) self._test_workspaces(corrected, fact)
def test_sample_and_can_subtraction(self): """ Tests corrections for the sample and simple container subtraction. """ corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=self._red_ws, SampleChemicalFormula='H2-O', CanWorkspace=self._can_ws, Events=200, UseCanCorrections=False) self.assertEqual(fact.size(), 1) self._test_workspaces(corrected, fact)
def test_beam_dimensions(self): """ Tests beam dimensions """ corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=self._red_ws, SampleChemicalFormula='H2-O', NumberWavelengths=10, Events=200, BeamHeight=2, BeamWidth=3) self.assertEqual(fact.size(), 1) self._test_workspaces(corrected, fact)
def test_sample_and_can_corrections(self): """ Tests corrections for the sample and container. """ corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=self._red_ws, SampleChemicalFormula='H2-O', CanWorkspace=self._can_ws, CanChemicalFormula='V', CanScaleFactor=0.8, Events=200, UseCanCorrections=True) self.assertEqual(fact.size(), 2) self._test_workspaces(corrected, fact)
def test_mass_density_for_sample_can(self): """ Test simple run with sample and can workspace and number density for both """ corrected, fact = IndirectAnnulusAbsorption(SampleWorkspace=self._red_ws, SampleChemicalFormula='H2-O', SampleDensityType='Mass Density', SampleDensity=0.5, CanWorkspace=self._can_ws, CanChemicalFormula='V', CanDensityType='Mass Density', CanDensity=0.5, Events=200, UseCanCorrections=True) self.assertEqual(fact.size(), 2) self._test_workspaces(corrected, fact)