Exemple #1
0
    def test_sample_corrections_only(self):
        """
        Tests corrections for the sample only.
        """

        corrected, fact = IndirectCylinderAbsorption(SampleWorkspace=self._red_ws,
                                                     SampleChemicalFormula='H2-O',
                                                     Events=500)

        self.assertEqual(fact.size(), 1)
        self._test_workspaces(corrected, fact)
Exemple #2
0
    def test_sample_and_can_subtraction(self):
        """
        Tests corrections for the sample and simple container subtraction.
        """

        corrected, fact = IndirectCylinderAbsorption(SampleWorkspace=self._red_ws,
                                                     CanWorkspace=self._can_ws,
                                                     SampleChemicalFormula='H2-O',
                                                     UseCanCorrections=False,
                                                     Events=200)

        self.assertEqual(fact.size(), 1)
        self._test_workspaces(corrected, fact)
Exemple #3
0
    def test_beam_dimensions(self):
        """
        Tests beam dimensions
        """

        corrected, fact = IndirectCylinderAbsorption(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 = IndirectCylinderAbsorption(SampleWorkspace=self._red_ws,
                                                     CanWorkspace=self._can_ws,
                                                     SampleChemicalFormula='H2-O',
                                                     CanChemicalFormula='V',
                                                     UseCanCorrections=True,
                                                     Events=500,
                                                     Version = 1)

        self.assertEqual(fact.size(), 2)
        self._test_workspaces(corrected, fact)
Exemple #5
0
    def test_mass_density_for_sample_can(self):
        """
        Test simple run with sample and can workspace and number density for both
        """

        corrected, fact = IndirectCylinderAbsorption(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)