def disabled_test_runs_ok_when_calculating(self):
        """
        Checks normal operation, when calculating integrations and curves from Vanadium run data
        """
        sample_ws = self.__class__._data_ws
        integ_ws_name = 'calc_integ_ws'
        curves_ws_name = 'calc_curves_ws'
        sapi.EnggVanadiumCorrections(Workspace=sample_ws,
                                     VanadiumWorkspace=self.__class__._van_ws,
                                     IntegrationWorkspace=integ_ws_name,
                                     CurvesWorkspace=curves_ws_name)

        self._check_corrected_ws(sample_ws)
        self._check_integ_ws(integ_ws_name)
        self._check_curves_ws(curves_ws_name)
    def test_runs_ok_when_reusing_precalculated(self):
        """
        Checks normal operation, re-using previously calculated integrations and curves from
        Vanadium run data
        """
        sample_ws = self.__class__._data_ws
        int_ws = self.__class__._van_integ_tbl
        curves_ws = self.__class__._van_curves_ws
        sapi.EnggVanadiumCorrections(Workspace=sample_ws,
                                     IntegrationWorkspace=int_ws,
                                     CurvesWorkspace=curves_ws)

        self._check_corrected_ws(sample_ws)
        self._check_integ_ws(int_ws)
        self._check_curves_ws(curves_ws)
Example #3
0
def create_vanadium(van_run, calibration_directory):
    """
    create the vanadium run for the run number set of the object

    @param van_run :: the run number for the vanadium
    @param calibration_directory :: the directory to save the output to
    """
    # find and load the vanadium
    van_file = _gen_filename(van_run)
    van_curves_file, van_int_file = _get_van_names(van_run, calibration_directory)
    van_name = "eng_vanadium_ws"
    simple.Load(van_file, OutputWorkspace=van_name)

    # make the vanadium corrections
    simple.EnggVanadiumCorrections(VanadiumWorkspace=van_name,
                                   OutIntegrationWorkspace="eng_vanadium_integration",
                                   OutCurvesWorkspace="eng_vanadium_curves")

    # save out the vanadium and delete the original workspace
    simple.SaveNexus("eng_vanadium_integration", van_int_file)
    simple.SaveNexus("eng_vanadium_curves", van_curves_file)
    simple.DeleteWorkspace(van_name)