def _calculate_vanadium_correction(vanadium_path): """ Runs the vanadium correction algorithm. :param vanadium_path: The path to the vanadium data. :return: The integrated workspace and the curves generated by the algorithm. """ try: Load(Filename=vanadium_path, OutputWorkspace=VANADIUM_INPUT_WORKSPACE_NAME) except Exception as e: logger.error("Error when loading vanadium sample data. " "Could not run Load algorithm with vanadium run number: " + str(vanadium_path) + ". Error description: " + str(e)) raise RuntimeError EnggVanadiumCorrections(VanadiumWorkspace=VANADIUM_INPUT_WORKSPACE_NAME, OutIntegrationWorkspace=INTEGRATED_WORKSPACE_NAME, OutCurvesWorkspace=CURVES_WORKSPACE_NAME) Ads.remove(VANADIUM_INPUT_WORKSPACE_NAME) integrated_workspace = Ads.Instance().retrieve(INTEGRATED_WORKSPACE_NAME) curves_workspace = Ads.Instance().retrieve(CURVES_WORKSPACE_NAME) return integrated_workspace, curves_workspace
def tearDown(self): AnalysisDataService.Instance().clear()