Exemple #1
0
    def test_fail_spec_min(self):
        """
        Tests validation for SpecMin >= 0.
        """

        with self.assertRaises(RuntimeError):
            msd, param, fit = MSDFit(InputWorkspace=self._ws,
                                     XStart=0.0, XEnd=5.0,
                                     SpecMin=-1, SpecMax=0)
Exemple #2
0
    def test_basic_run_given_names(self):
        """
        Tests a basic run providing names of all output workspaces.
        """

        msd, param, fit = MSDFit(InputWorkspace=self._ws,
                                 XStart=0.0, XEnd=5.0,
                                 SpecMin=0, SpecMax=4)

        self._validate_workspaces(msd, param, fit)
Exemple #3
0
 def runTest(self):
     """
     Override parent method, does the work of running the test
     """
     try:
         Load(Filename='BASIS_63652_63720_elwin_eq.nxs',
              OutputWorkspace='elwin_eq')
         MSDFit(InputWorkspace='elwin_eq', Model='Gauss', SpecMax=68,
                XStart=0.3, XEnd=1.3, OutputWorkspace='outMSD')
     finally:
         self.preptear()
Exemple #4
0
    def test_basic_run(self):
        """
        Tests a basic run providing the MSD workspace as output.
        """

        MSDFit(InputWorkspace=self._ws,
               XStart=0.0, XEnd=5.0,
               SpecMin=0, SpecMax=4,
               OutputWorkspace='msd')

        self.assertTrue(mtd.doesExist('msd_Parameters'), 'Should have a parameter WS with the default name')
        self.assertTrue(mtd.doesExist('msd_Workspaces'), 'Should have a fit WS with the default name')
        self._validate_workspaces(mtd['msd'], mtd['msd_Parameters'], mtd['msd_Workspaces'])