Beispiel #1
0
    def test_basic(self):
        """
        Tests a very minimal execution.
        """
        symm_test_out_ws = Symmetrise(InputWorkspace=self._sample_ws, XMin=0.05, XMax=0.2)

        self._validate_workspace(symm_test_out_ws)
Beispiel #2
0
    def test_symm_about_zero(self):
        """
        Tests symmetrising about x=0.
        """
        symm_test_out_ws = Symmetrise(InputWorkspace=self._sample_ws,
                                      XMin=0.0, XMax=0.2)

        self._validate_workspace(symm_test_out_ws)
Beispiel #3
0
    def test_with_spectra_range(self):
        """
        Tests running with a given spectra range.
        """
        symm_test_out_ws = Symmetrise(InputWorkspace=self._sample_ws,
                                      XMin=0.05, XMax=0.2,
                                      SpectraRange=[1, 1])

        self._validate_workspace(symm_test_out_ws)
Beispiel #4
0
    def test_handle_different_bin_width_in_sample_ws(self):
        """
        Tests validation on entering a maximum spectra number higher then that of the workspace.
        """
        symm_test_out_ws = Symmetrise(InputWorkspace=self._sample_ws,
                                      XMin=2.1,
                                      XMax=3.3,
                                      SpectraRange=[1, 1])

        self._validate_workspace(symm_test_out_ws)
Beispiel #5
0
    def test_symm_spectra_range(self):
        """
        Tests symmetrising a subset of the spectra in a workspace.
        """
        self._sample_ws = _generate_big_sample_ws('symm_test_sample_ws', 10)
        self._spec_range = [3, 7]

        symm_test_out_ws = Symmetrise(InputWorkspace=self._sample_ws,
                                      XMin=0.05, XMax=0.2,
                                      SpectraRange=self._spec_range)

        self._validate_workspace(symm_test_out_ws)