Skip to content

Commit

Permalink
respond to pr review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MialLewis committed May 2, 2023
1 parent dcdd025 commit 4c54a5c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
from mantid.kernel import StringArrayProperty, Direction, StringListValidator, IntArrayBoundedValidator, IntArrayProperty,\
FloatArrayBoundedValidator, FloatArrayMandatoryValidator, StringMandatoryValidator, IntBoundedValidator,\
FloatArrayProperty
from mantid.api import FileProperty, FileAction, ITableWorkspaceProperty, PropertyMode, Progress, TextAxis, PythonAlgorithm,\
AlgorithmManager
from mantid.simpleapi import CreateEmptyTableWorkspace, DeleteWorkspace, CropWorkspace, RebinToWorkspace, Divide,\
ReplaceSpecialValues, FindPeaks, GroupWorkspaces, mtd, Plus, LoadVesuvio, LoadRaw, ConvertToDistribution,\
FindPeakBackground, ExtractSingleSpectrum, SumSpectra, AppendSpectra, ConvertTableToMatrixWorkspace,\
ConjoinWorkspaces, Transpose, PlotPeakByLogValue, CloneWorkspace, MaskDetectors,\
ExtractUnmaskedSpectra, CreateWorkspace, RenameWorkspace
from mantid.kernel import StringArrayProperty, Direction, StringListValidator, FloatArrayBoundedValidator, StringMandatoryValidator,\
IntBoundedValidator, FloatArrayProperty
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

import os
Expand Down Expand Up @@ -280,7 +275,6 @@ def _calculate_scattering_angle(self, table_name, spec_list):
L0 = EVSMiscFunctions.read_table_column(self._current_workspace, 'L0', spec_list)
L1 = EVSMiscFunctions.read_table_column(self._param_table, 'L1', spec_list)
L1_nan_to_num = np.nan_to_num(L1)
spec = EVSMiscFunctions.read_table_column(self._current_workspace, 'Spectrum', spec_list)

t0 /= 1e+6

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from mantid.kernel import StringArrayProperty, Direction, StringListValidator, IntArrayBoundedValidator, IntArrayProperty,\
FloatArrayBoundedValidator, FloatArrayMandatoryValidator, StringMandatoryValidator, IntBoundedValidator,\
FloatArrayProperty, logger
FloatArrayBoundedValidator, FloatArrayMandatoryValidator, StringMandatoryValidator, FloatArrayProperty, logger
from mantid.api import FileProperty, FileAction, ITableWorkspaceProperty, PropertyMode, Progress, TextAxis, PythonAlgorithm,\
WorkspaceFactory, AnalysisDataService
from mantid.simpleapi import CreateEmptyTableWorkspace, DeleteWorkspace, CropWorkspace, RebinToWorkspace, Divide,\
ReplaceSpecialValues, FindPeaks, GroupWorkspaces, mtd, Plus, LoadVesuvio, LoadRaw, ConvertToDistribution,\
FindPeakBackground, ExtractSingleSpectrum, SumSpectra, AppendSpectra, ConvertTableToMatrixWorkspace,\
ConjoinWorkspaces, Transpose, PlotPeakByLogValue, CloneWorkspace, Fit, MaskDetectors,\
ExtractUnmaskedSpectra, CreateWorkspace
ReplaceSpecialValues, FindPeaks, GroupWorkspaces, mtd, Plus, LoadVesuvio, LoadRaw, ConvertToDistribution, FindPeakBackground,\
ExtractSingleSpectrum, SumSpectra, AppendSpectra, CloneWorkspace, Fit, MaskDetectors, ExtractUnmaskedSpectra, CreateWorkspace
from functools import partial
from unpackaged.vesuvio_calibration.calibration_scripts.calibrate_vesuvio_helper_functions import EVSGlobals, EVSMiscFunctions

Expand Down
5 changes: 2 additions & 3 deletions unpackaged/vesuvio_calibration/load_calibration_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
EVSCalibrationFit is used to fit m peaks to n spectra. The positions of the peaks are esitmated using the supplied instrument parameter
file and the d-spacings of the sample (if provided). Support is provided for both Voigt and Gaussian functions.
EVSCalibrationAnalysis uses EVSCalibrationFit to calculate instrument parameters using the output of the fitting and the and an existing
instrument parameter file.
EVSCalibrationAnalysis uses the output from EVSCalibrationFit to calculate instrument parameters.
The procedures used here are based upon those descibed in: Calibration of an electron volt neutron spectrometer, Nuclear Instruments and
The procedures used here are based upon those described in: Calibration of an electron volt neutron spectrometer, Nuclear Instruments and
Methods in Physics Research A (15 October 2010), doi:10.1016/j.nima.2010.09.079 by J. Mayers, M. A. Adams
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np

from mantid.api import AlgorithmFactory
from mantid.simpleapi import LoadVesuvio, LoadRaw, mtd, ConvertToDistribution
from mantid.simpleapi import mtd
from mock import patch
from unpackaged.vesuvio_calibration.tests.testhelpers.algorithms import create_algorithm
from unpackaged.vesuvio_calibration.tests.testhelpers.system_test_base import EVSCalibrationTest, TestConstants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import scipy.stats

from mantid.api import WorkspaceGroup, AlgorithmFactory
from mantid.simpleapi import LoadVesuvio, LoadRaw, mtd, ConvertToDistribution
from mantid.simpleapi import mtd
from mock import patch
from unpackaged.vesuvio_calibration.tests.testhelpers.algorithms import create_algorithm
from unpackaged.vesuvio_calibration.tests.testhelpers.system_test_base import EVSCalibrationTest, TestConstants
Expand Down

0 comments on commit 4c54a5c

Please sign in to comment.