From a5d8f04dc9e1773e8a7841788f5cb72530266db4 Mon Sep 17 00:00:00 2001 From: MialLewis <95620982+MialLewis@users.noreply.github.com> Date: Tue, 2 May 2023 11:51:59 +0100 Subject: [PATCH] update paths to run from calibration root --- .../calibration_scripts/calibrate_vesuvio_analysis.py | 2 +- .../tests/unit/test_calibrate_vesuvio_misc.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unpackaged/vesuvio_calibration/calibration_scripts/calibrate_vesuvio_analysis.py b/unpackaged/vesuvio_calibration/calibration_scripts/calibrate_vesuvio_analysis.py index 016593be..34d9518c 100644 --- a/unpackaged/vesuvio_calibration/calibration_scripts/calibrate_vesuvio_analysis.py +++ b/unpackaged/vesuvio_calibration/calibration_scripts/calibrate_vesuvio_analysis.py @@ -25,7 +25,7 @@ from mantid.api import FileProperty, FileAction, PythonAlgorithm,AlgorithmManager from mantid.simpleapi import CreateEmptyTableWorkspace, DeleteWorkspace, ReplaceSpecialValues, GroupWorkspaces, mtd,\ ConvertTableToMatrixWorkspace, ConjoinWorkspaces, Transpose, PlotPeakByLogValue,RenameWorkspace -from unpackaged.vesuvio_calibration.calibration_scripts.calibrate_vesuvio_helper_functions import EVSGlobals, EVSMiscFunctions,\ +from calibration_scripts.calibrate_vesuvio_helper_functions import EVSGlobals, EVSMiscFunctions,\ InvalidDetectors >>>>>>> 1fa741e (respond to pr review comments) diff --git a/unpackaged/vesuvio_calibration/tests/unit/test_calibrate_vesuvio_misc.py b/unpackaged/vesuvio_calibration/tests/unit/test_calibrate_vesuvio_misc.py index ec4fc6a4..6cdc1ca5 100644 --- a/unpackaged/vesuvio_calibration/tests/unit/test_calibrate_vesuvio_misc.py +++ b/unpackaged/vesuvio_calibration/tests/unit/test_calibrate_vesuvio_misc.py @@ -107,7 +107,7 @@ def test_get_all_detectors(self): invalid_detectors = InvalidDetectors([10, 20, 30, 150, 160, 170]) self.assertEqual(invalid_detectors.get_all_invalid_detectors(), input_invalid_detectors) - @patch('unpackaged.vesuvio_calibration.calibration_scripts.calibrate_vesuvio_helper_functions' + @patch('calibration_scripts.calibrate_vesuvio_helper_functions' '.EVSMiscFunctions.read_fitting_result_table_column') def test_filter_peak_centres_for_invalid_detectors_front(self, mock_read_fitting_result): invalid_detectors = InvalidDetectors([10, 20, 30, 150, 160, 170]) @@ -117,7 +117,7 @@ def test_filter_peak_centres_for_invalid_detectors_front(self, mock_read_fitting out_peak_centres = invalid_detectors.filter_peak_centres_for_invalid_detectors([3, 134], peak_table) self.assertEqual(list(np.argwhere(np.isnan(out_peak_centres)).transpose()[0]), [7, 17, 27]) - @patch('unpackaged.vesuvio_calibration.calibration_scripts.calibrate_vesuvio_helper_functions' + @patch('calibration_scripts.calibrate_vesuvio_helper_functions' '.EVSMiscFunctions.read_fitting_result_table_column') def test_filter_peak_centres_for_invalid_detectors_back(self, mock_read_fitting_result): invalid_detectors = InvalidDetectors([10, 20, 30, 150, 160, 170]) @@ -127,7 +127,7 @@ def test_filter_peak_centres_for_invalid_detectors_back(self, mock_read_fitting_ out_peak_centres = invalid_detectors.filter_peak_centres_for_invalid_detectors([135, 198], peak_table) self.assertEqual(list(np.argwhere(np.isnan(out_peak_centres)).transpose()[0]), [15, 25, 35]) - @patch('unpackaged.vesuvio_calibration.calibration_scripts.calibrate_vesuvio_helper_functions' + @patch('calibration_scripts.calibrate_vesuvio_helper_functions' '.EVSMiscFunctions.read_fitting_result_table_column') def test_filter_peak_centres_for_invalid_detectors_invalid_range(self, mock_read_fitting_result): invalid_detectors = InvalidDetectors([10, 20, 30, 150, 160, 170])