From 3e5da331ecdda10715499b4dbaa66286a36599e5 Mon Sep 17 00:00:00 2001 From: "luz.paz" <luzpaz@users.noreply.github.com> Date: Mon, 24 Sep 2018 10:26:25 -0400 Subject: [PATCH] scripts: typo fixes Found via `codespell -q 3 -I ../mantid-word-whitelist.txt -L mye,amin` --- .../AbinsModules/FrequencyPowderGenerator.py | 6 +- .../Examples/TubeCalibDemoMaps_All.py | 38 +++++------ .../Examples/TubeCalibDemoMaps_B1.py | 2 +- .../Examples/TubeCalibDemoMaps_C4C3.py | 2 +- .../Examples/TubeCalibDemoMaps_C4C3C2.py | 4 +- .../Examples/TubeCalibDemoMaps_D2.py | 2 +- .../TubeCalibDemoMaps_D2_WideMargins.py | 2 +- .../Examples/TubeCalibDemoMaps_D4.py | 2 +- .../Examples/TubeCalibDemoMerlin.py | 8 +-- .../Examples/TubeCalibDemoMerlin_Simple.py | 4 +- .../Examples/TubeCalibDemoWish_Simple.py | 4 +- scripts/Calibration/ideal_tube.py | 6 +- scripts/Calibration/tube.py | 16 ++--- scripts/Calibration/tube_calib.py | 4 +- scripts/Calibration/tube_calib_fit_params.py | 2 +- scripts/Calibration/tube_spec.py | 4 +- scripts/DGSPlanner/DGSPlannerGUI.py | 2 +- .../DiamondAttenuationCorrection/FitTrans.py | 4 +- scripts/FilterEvents/MplFigureCanvas.py | 2 +- scripts/FilterEvents/eventFilterGUI.py | 6 +- .../HfirPDReductionControl.py | 6 +- .../HFIRPowderReduction/HfirPDReductionGUI.py | 2 +- scripts/HFIRPowderReduction/MainWindow.ui | 2 +- .../HFIRPowderReduction/MplFigureCanvas.py | 8 +-- scripts/HFIRPowderReduction/README.md | 14 ++-- scripts/HFIR_4Circle_Reduction/MainWindow.ui | 4 +- scripts/HFIR_4Circle_Reduction/fputility.py | 2 +- scripts/HFIR_4Circle_Reduction/guiutility.py | 2 +- scripts/HFIR_4Circle_Reduction/hfctables.py | 2 +- .../HFIR_4Circle_Reduction/mplgraphicsview.py | 6 +- .../peakprocesshelper.py | 2 +- .../reduce4circleControl.py | 2 +- .../reduce4circleGUI.py | 6 +- .../refineubfftsetup.py | 2 +- .../HFIR_4Circle_Reduction/viewspicedialog.py | 2 +- scripts/Inelastic/CrystalField/fitting.py | 2 +- .../Direct/DirectEnergyConversion.py | 2 +- .../Direct/ISISDirecInelasticConfig.py | 2 +- scripts/Inelastic/Direct/NonIDF_Properties.py | 2 +- scripts/Inelastic/Direct/PropertyManager.py | 2 +- scripts/Inelastic/Direct/ReductionHelpers.py | 2 +- scripts/Inelastic/Direct/ReductionWrapper.py | 2 +- scripts/Inelastic/Direct/RunDescriptor.py | 2 +- scripts/Inelastic/Direct/__init__.py | 2 +- scripts/Inelastic/Direct/dgreduce.py | 2 +- scripts/Inelastic/IndirectBayes.py | 6 +- scripts/Inelastic/IndirectCommon.py | 4 +- scripts/Inelastic/vesuvio/commands.py | 2 +- .../reduction/sans/hfir_options_script.py | 2 +- .../diffraction/diffraction_adv_setup.py | 4 +- .../diffraction/diffraction_run_setup.py | 10 +-- .../ui/diffraction/diffraction_adv_setup.ui | 4 +- .../ui/diffraction/diffraction_run_setup.ui | 4 +- .../Interface/ui/reflectometer/refl_gui.py | 2 +- .../Interface/ui/reflectometer/refl_save.py | 2 +- .../Interface/ui/sans_isis/masking_table.ui | 2 +- .../sans_isis/sans_data_processor_window.ui | 14 ++-- .../LargeScaleStructures/data_stitching.py | 2 +- .../LargeScaleStructures/geometry_writer.py | 2 +- .../Plotting/plotting_view.py | 2 +- scripts/Muon/MaxentTools/multimaxalpha.py | 2 +- scripts/PyChop/ISISDisk.py | 4 +- scripts/PyChop/ISISFermi.py | 4 +- scripts/PyChop/Instruments.py | 6 +- scripts/PyChop/MulpyRep.py | 4 +- scripts/PyChop/let.yaml | 6 +- scripts/PyChop/maps.yaml | 8 +-- scripts/PyChop/mari.yaml | 6 +- scripts/PyChop/merlin.yaml | 6 +- scripts/QECoverage.py | 2 +- .../isis_reflectometry/combineMulti.py | 4 +- .../Reflectometry/isis_reflectometry/quick.py | 6 +- scripts/SANS/DarkRunCorrection.py | 2 +- scripts/SANS/ISISCommandInterface.py | 26 +++---- scripts/SANS/SANSBatchMode.py | 2 +- scripts/SANS/SANSUserFileParser.py | 8 +-- scripts/SANS/SANSUtility.py | 24 +++---- scripts/SANS/SANSadd2.py | 2 +- scripts/SANS/centre_finder.py | 6 +- scripts/SANS/isis_instrument.py | 28 ++++---- scripts/SANS/isis_reducer.py | 6 +- scripts/SANS/isis_reduction_steps.py | 22 +++--- scripts/SANS/reduction_settings.py | 2 +- .../sans/algorithm_detail/batch_execution.py | 2 +- .../sans/algorithm_detail/mask_functions.py | 2 +- .../sans/algorithm_detail/mask_workspace.py | 2 +- .../sans/algorithm_detail/single_execution.py | 2 +- .../SANS/sans/algorithm_detail/xml_shapes.py | 2 +- .../command_interface/ISISCommandInterface.py | 12 ++-- .../command_interface_state_director.py | 4 +- scripts/SANS/sans/common/constants.py | 2 +- scripts/SANS/sans/common/file_information.py | 4 +- scripts/SANS/sans/common/general_functions.py | 2 +- .../sans/gui_logic/models/state_gui_model.py | 6 +- scripts/SANS/sans/state/state.py | 2 +- scripts/SANS/sans/state/state_base.py | 4 +- scripts/SANS/sans/test_helper/mock_objects.py | 2 +- .../SANS/sans/user_file/user_file_parser.py | 8 +-- scripts/SCD_Reduction/ICCFitTools.py | 10 +-- scripts/SCD_Reduction/ReduceSCD.config | 67 +++++++++---------- scripts/SCD_Reduction/ReduceSCD_OneRun.py | 8 +-- scripts/SCD_Reduction/ReduceSCD_Parallel.py | 8 +-- scripts/SCD_Reduction/TOPAZ.config | 58 ++++++++-------- .../instruments/sans/sans_reduction_steps.py | 12 ++-- .../sans/hfir_command_interface.py | 2 +- .../DirectPropertyManater_OldInterfaceXest.py | 2 +- scripts/test/PyChopTest.py | 2 +- .../SANS/user_file/state_director_test.py | 2 +- scripts/test/SANSCommandInterfaceTest.py | 2 +- scripts/test/SANSReducerTest.py | 4 +- scripts/test/SANSUtilityTest.py | 4 +- 111 files changed, 343 insertions(+), 344 deletions(-) diff --git a/scripts/AbinsModules/FrequencyPowderGenerator.py b/scripts/AbinsModules/FrequencyPowderGenerator.py index 1259070d87a..220cbe486a7 100644 --- a/scripts/AbinsModules/FrequencyPowderGenerator.py +++ b/scripts/AbinsModules/FrequencyPowderGenerator.py @@ -30,12 +30,12 @@ class FrequencyPowderGenerator(object): len(fundamentals_array.shape) == 1 and fundamentals_array.dtype.num == AbinsModules.AbinsConstants.FLOAT_ID): - raise ValueError("Fundamentals in the form of one dimentional array are expected.") + raise ValueError("Fundamentals in the form of one dimensional array are expected.") if not (isinstance(fundamentals_coefficients, np.ndarray) and len(fundamentals_coefficients.shape) == 1 and fundamentals_coefficients.dtype.num == AbinsModules.AbinsConstants.INT_ID): - raise ValueError("Coefficients of fundamentals in the form of one dimentional array are expected.") + raise ValueError("Coefficients of fundamentals in the form of one dimensional array are expected.") if fundamentals_coefficients.size != fundamentals_array.size: raise ValueError("Inconsistent size of fundamentals and corresponding coefficients. " @@ -59,7 +59,7 @@ class FrequencyPowderGenerator(object): if not (isinstance(previous_array, np.ndarray) and len(previous_array.shape) == 1 and previous_array.dtype.num == AbinsModules.AbinsConstants.FLOAT_ID): - raise ValueError("One dimentional array is expected.") + raise ValueError("One dimensional array is expected.") if not (isinstance(previous_coefficients, np.ndarray) and len(previous_coefficients.shape) == min(2, quantum_order - 1) and diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_All.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_All.py index 524b4c95fe1..d3b27ca9381 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_All.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_All.py @@ -78,9 +78,9 @@ def minimalInput(filename): The minimal input for the calibration is the integrated workspace - and the knwon positions. + and the known positions. - Eventhough it is easy to call, the calibration performs well, but there are ways to improve + Even though it is easy to call, the calibration performs well, but there are ways to improve the results, as it is explored after. .. image:: /images/outputOfMinimalInput.png @@ -88,7 +88,7 @@ def minimalInput(filename): """ CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -104,13 +104,13 @@ def provideTheExpectedValue(filename): Giving the expected value for the position of the peaks in pixel. The :func:`~Examples.minimalInput` let to the calibrate to guess the position of the pixels - among the tubes. Altough it works nicelly, providing these expected values may improve the results. + among the tubes. Although it works nicelly, providing these expected values may improve the results. This is done through the **fitPar** parameter. """ from tube_calib_fit_params import TubeCalibFitParams CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -129,7 +129,7 @@ def provideTheExpectedValue(filename): def changeMarginAndExpectedValue(filename): """ - To fit correcly, it is important to have a good window around the peak. This windown is defined + To fit correctly, it is important to have a good window around the peak. This windown is defined by the **margin** parameter. This examples shows how the results worsen if we change the margin from its default value **15** @@ -152,7 +152,7 @@ def changeMarginAndExpectedValue(filename): from tube_calib_fit_params import TubeCalibFitParams CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -183,7 +183,7 @@ def improvingCalibrationSingleTube(filename): From the outputs of provideTheExpectedValue, looking inside the instrument tree, it is possible to list all the tubes that are not so good. - Unfortunatelly, they do not have a single name identifier. + Unfortunately, they do not have a single name identifier. So, locating them it is a little bit trickier. The :func:`~Examples.findThoseTubesThatNeedSpecialCareForCalibration` shows one way of finding those tubes. The index is the position inside the PeakTable. @@ -201,7 +201,7 @@ def improvingCalibrationSingleTube(filename): from tube_calib_fit_params import TubeCalibFitParams CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -228,7 +228,7 @@ def improvingCalibrationSingleTube(filename): overridePeaks = {19: [8.14, 80.9771, 123.221, 164.993, 245.717]} # == Get the calibration and put results into calibration table == - # we will not plot anymore, because it will not plot the overrided peaks + # we will not plot anymore, because it will not plot the overridden peaks calibrationTable, peakTable = tube.calibrate(CalibInstWS, CalibratedComponent, knownPos, funcFactor, fitPar=fitPar, outputPeak=True, rangeList=[18, 19, 20], overridePeaks=overridePeaks) @@ -256,7 +256,7 @@ def improvingCalibrationOfListOfTubes(filename): CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -313,7 +313,7 @@ def calibrateB2Window(filename): CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, 0.16, 0.50], [2, 1, 1, 2] @@ -344,7 +344,7 @@ def findThoseTubesThatNeedSpecialCareForCalibration(filename): them, it will process the **peakTable** output of the calibrate method when enabling the parameter **outputPeak**. - It them creates the Peaks workspace, that is the diffence of the peaks position from the + It them creates the Peaks workspace, that is the difference of the peaks position from the expected values of the peaks positions for all the tubes. This allows to spot what are the tubes whose fitting are outliers in relation to the others. @@ -356,7 +356,7 @@ def findThoseTubesThatNeedSpecialCareForCalibration(filename): from tube_calib_fit_params import TubeCalibFitParams CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) knownPos, funcFactor = [-0.50, -0.16, -0.00, 0.16, 0.50], [2, 1, 1, 1, 2] @@ -397,7 +397,7 @@ def findThoseTubesThatNeedSpecialCareForCalibration(filename): # at most 12 pixels from the expected values. # so let's investigate those that differ more than 12 - # return an array with the indexes for the first axis which is the tube indentification + # return an array with the indexes for the first axis which is the tube identification check = numpy.where(distance_from_expected > 12)[0] # remove repeated values @@ -411,7 +411,7 @@ def findThoseTubesThatNeedSpecialCareForCalibration(filename): CalibInstWS = loadingStep(filename) tube.calibrate(CalibInstWS, CalibratedComponent, knownPos, funcFactor, fitPar=fitPar, rangeList=problematic_tubes, plotTube=problematic_tubes) - # plot the FittedTube agains TubePlot for each detector and you will see that there were problems on those tubes. + # plot the FittedTube against TubePlot for each detector and you will see that there were problems on those tubes. def completeCalibration(filename): @@ -421,7 +421,7 @@ def completeCalibration(filename): and improved in :func:`calibrateB2Window`, and :func:`improvingCalibrationOfListOfTubes`. It also improves the result of the calibration because it deals with the E door. The - aquired data cannot be used to calibrate the E door, and trying to do so, produces a bad + acquired data cannot be used to calibrate the E door, and trying to do so, produces a bad result. In this example, the tubes inside the E door are excluded to the calibration. Using the '''rangeList''' option. """ @@ -431,7 +431,7 @@ def completeCalibration(filename): CalibInstWS = loadingStep(filename) # == Set parameters for calibration == - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MAPS' # Calibrate all # define the known positions and function factor (edge, peak, peak, peak, edge) @@ -443,7 +443,7 @@ def completeCalibration(filename): fitPar.setAutomatic(True) # execute the improvingCalibrationOfListOfTubes excluding the range of b2 window - # correct the definition of the peaks for the folowing indexes + # correct the definition of the peaks for the following indexes # define_peaks = {19:[10, 80.9771, 123.221, 164.993, 245.717], # the first one was bad # 37: [6.36, 80.9347, 122.941, 165.104, 248.32], # the first one was bad # 71: [8.62752, 85.074, 124.919, 164.116, 246.82 ], # the last one was bad - check if we can inprove diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_B1.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_B1.py index 15c1a6142dd..e0f62e1261b 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_B1.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_B1.py @@ -22,7 +22,7 @@ ExpectedWidth = 8.0 # Expected width of Gaussian peaks in pixels (initial valu ExpectedPositions = [4.0, 85.0, 128.0, 161.0, 252.0] # Expected positions of the edges and Gaussian peaks in pixels (initial values of fit parameters) -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'B1_window' # Calibrate B1 window # Get calibration raw file and integrate it diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3.py index 65e4a5ec8dd..c4d0313e5b1 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3.py @@ -18,7 +18,7 @@ filename = 'MAP14919.raw' # Name of calibration run rangeLower = 2000 # Integrate counts in each spectra from rangeLower to rangeUpper rangeUpper = 10000 # -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent1 = 'C4_window' # Calibrate C4 window CalibratedComponent2 = 'C3_window' # Calibrate C3 window diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3C2.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3C2.py index a234317ce54..04e461eeead 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3C2.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_C4C3C2.py @@ -16,8 +16,8 @@ filename = 'MAP14919.raw' # Name of calibration run rangeLower = 2000 # Integrate counts in each spectra from rangeLower to rangeUpper rangeUpper = 10000 # -# Set what we want to calibrate (e.g whole intrument or one door ) -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponents = ['C4_window', 'C3_window', 'C2_window'] # Calibrate three C windows # Get calibration raw file and integrate it diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_D2.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_D2.py index 5a638f55f1e..54a0d0b4698 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_D2.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_D2.py @@ -13,7 +13,7 @@ import mantid.simpleapi as mantid # == Set parameters for calibration == filename = 'MAP14919.raw' # Calibration run ( found in \\isis\inst$\NDXMAPS\Instrument\data\cycle_09_5 ) -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'D2_window' # Calibrate D2 window # Get calibration raw file and integrate it diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_D2_WideMargins.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_D2_WideMargins.py index 8d1364489e0..4bfaa57e5fd 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_D2_WideMargins.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_D2_WideMargins.py @@ -15,7 +15,7 @@ filename = 'MAP14919.raw' # Name of calibration run rangeLower = 2000 # Integrate counts in each spectra from rangeLower to rangeUpper rangeUpper = 10000 # -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'D2_window' # Calibrate D2 window # Get calibration raw file and integrate it diff --git a/scripts/Calibration/Examples/TubeCalibDemoMaps_D4.py b/scripts/Calibration/Examples/TubeCalibDemoMaps_D4.py index bab3431cb80..85185918b64 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMaps_D4.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMaps_D4.py @@ -13,7 +13,7 @@ import mantid.simpleapi as mantid # == Set parameters for calibration == filename = 'MAP14919.raw' # Calibration run ( found in \\isis\inst$\NDXMAPS\Instrument\data\cycle_09_5 ) -# Set what we want to calibrate (e.g whole intrument or one door ) +# Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'D4_window' # Calibrate D4 window # Get calibration raw file and integrate it diff --git a/scripts/Calibration/Examples/TubeCalibDemoMerlin.py b/scripts/Calibration/Examples/TubeCalibDemoMerlin.py index 79b467a4ab9..faa2e89f085 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMerlin.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMerlin.py @@ -144,7 +144,7 @@ def calibrateMerlin(filename): # For the tubes 2_x (smaller tube above, it is better to take the first part of known positions: edge1, edge2, peak1,peak2 # NOTE: the smaller tubes they have length = 1.22879882813, but 1024 detectors - # so we have to correct the known positiosn by multiplying by its lenght and dividing by the longer dimension + # so we have to correct the known positiosn by multiplying by its length and dividing by the longer dimension from tube_calib_fit_params import TubeCalibFitParams @@ -155,7 +155,7 @@ def calibrateMerlin(filename): 2.92713867188 - 1.22879882813) / 2 # difference among the expected center position for # both tubes here a little bit of attempts is necessary. - # The effective center position and lengh is different for the calibrated tube, that is the reason, + # The effective center position and length is different for the calibrated tube, that is the reason, # the calibrated values of the smaller tube does not seems aligned with the others. By, finding the # 'best' half_diff_center value, the alignment occurs nicely. half_diff_center = 0.835 # @@ -165,7 +165,7 @@ def calibrateMerlin(filename): doorpos = knownPositions[[5, 6, 7, 8]] - half_diff_center doorfunc = [1, 1, 2, 2] # for the smal tubes, automatically searching for the peak position in pixel was not working quite well, - # so we will give the aproximate position for these tubes through fitPar argument + # so we will give the approximate position for these tubes through fitPar argument fitPar = TubeCalibFitParams([216, 527, 826, 989]) fitPar.setAutomatic(True) @@ -185,7 +185,7 @@ def calibrateMerlin(filename): doorfunc = [2, 2, 1, 1] # for the smal tubes, automatically searching for the peak position in pixel was not working quite well, - # so we will give the aproximate position for these tubes through fitPar argument + # so we will give the approximate position for these tubes through fitPar argument fitPar = TubeCalibFitParams([50, 202, 664, 815]) fitPar.setAutomatic(True) diff --git a/scripts/Calibration/Examples/TubeCalibDemoMerlin_Simple.py b/scripts/Calibration/Examples/TubeCalibDemoMerlin_Simple.py index 4f1e0a43020..559d10ae7ba 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoMerlin_Simple.py +++ b/scripts/Calibration/Examples/TubeCalibDemoMerlin_Simple.py @@ -42,7 +42,7 @@ def CalibrateMerlin(RunNumber): ExpectedPositions = [35.0, 512.0, 989.0] # Expected positions of the edges and peak in pixels (initial values of fit parameters) - # Set what we want to calibrate (e.g whole intrument or one door ) + # Set what we want to calibrate (e.g whole instrument or one door ) CalibratedComponent = 'MERLIN' # Calibrate door 2 # Get calibration raw file and integrate it @@ -86,7 +86,7 @@ def CalibrateMerlin(RunNumber): # mantid.SaveNexusProcessed(CalibInstWS, 'TubeCalibDemoMerlinResult.nxs', "Result of Running TubeCalibDemoMerlin_Simple.py") # print("saved calibrated workspace (CalibInstWS) into Nexus file TubeCalibDemoMerlinResult.nxs") - # == Reset dafault instrument == + # == Reset default instrument == mantid.config['default.instrument'] = previousDefaultInstrument # ==== End of CalibrateMerlin() ==== diff --git a/scripts/Calibration/Examples/TubeCalibDemoWish_Simple.py b/scripts/Calibration/Examples/TubeCalibDemoWish_Simple.py index f403d36b3a5..546de0806fb 100644 --- a/scripts/Calibration/Examples/TubeCalibDemoWish_Simple.py +++ b/scripts/Calibration/Examples/TubeCalibDemoWish_Simple.py @@ -33,7 +33,7 @@ def CalibrateWish(RunNumber, PanelNumber): # Give y-positions of slit points (gotten for converting first tube's slit point to Y) # WISH instrument has a particularity. It is composed by a group of upper tubes and lower tubes, - # they are disposed 3 milimiters in difference one among the other + # they are disposed 3 millimeters in difference one among the other lower_tube = numpy.array([-0.41, -0.31, -0.21, -0.11, -0.02, 0.09, 0.18, 0.28, 0.39]) upper_tube = numpy.array(lower_tube + 0.003) funcForm = 9 * [1] # 9 gaussian peaks @@ -65,7 +65,7 @@ def CalibrateWish(RunNumber, PanelNumber): # mantid.SaveNexusProcessed(CalibInstWS, 'TubeCalibDemoWishResult.nxs', "Result of Running TubeCalibWishMerlin_Simple.py") # print("saved calibrated workspace (CalibInstWS) into Nexus file", nexusName) - # == Reset dafault instrument == + # == Reset default instrument == mantid.config['default.instrument'] = previousDefaultInstrument # ==== End of CalibrateWish() ==== diff --git a/scripts/Calibration/ideal_tube.py b/scripts/Calibration/ideal_tube.py index 4a265fd49d3..551a8468f85 100644 --- a/scripts/Calibration/ideal_tube.py +++ b/scripts/Calibration/ideal_tube.py @@ -68,7 +68,7 @@ class IdealTube(object): :param activeTubeLen: Active tube length in metres """ - #Contruct Ideal tube for 3 point calibration of MERLIN standard tube (code could be put into a function) + #Construct Ideal tube for 3 point calibration of MERLIN standard tube (code could be put into a function) pixelLen = activeTubeLen/1024 # Pixel length # we then convert idealAP, idealCP and idealBP to Y coordinates and put into ideal tube array @@ -78,12 +78,12 @@ class IdealTube(object): def getArray( self ): """ - Reurn the array of of points where the peaks should be in Metres + Return the array of of points where the peaks should be in Metres """ return self.positions def getFunctionalForms( self ): """ - Reurn the array of of points where the peaks should be in Metres + Return the array of of points where the peaks should be in Metres """ return self.functionalForms diff --git a/scripts/Calibration/tube.py b/scripts/Calibration/tube.py index 1e2f216861f..192fb034849 100644 --- a/scripts/Calibration/tube.py +++ b/scripts/Calibration/tube.py @@ -47,7 +47,7 @@ Among the examples, inside the :py:mod:`Examples` folder, the user is encouraged carry a calibration to the group of tubes. * :py:func:`~Examples.TubeCalibDemoMaps_All.completeCalibration` demonstrate how the **rangeList**, **overridePeaks**, may be used together to allow the calibration of the whole instrument, despite, its particularities in some cases. -* :py:func:`~Examples.TubeCalibDemoMaps_All.findThoseTubesThatNeedSpecialCareForCalibration` show an aproach to find the +* :py:func:`~Examples.TubeCalibDemoMaps_All.findThoseTubesThatNeedSpecialCareForCalibration` show an approach to find the tubes that will require special care on calibrating. It will also help to find detectors that are not working well. ======== @@ -92,7 +92,7 @@ def calibrate(ws, tubeSet, knownPositions, funcForm, **kwargs): The calibration follows the following steps 1. Finding the peaks on each tube - 2. Fitting the peaks agains the Known Positions + 2. Fitting the peaks against the Known Positions 3. Defining the new position for the pixels(detectors) Let's consider the simplest way of calling calibrate: @@ -182,7 +182,7 @@ def calibrate(ws, tubeSet, knownPositions, funcForm, **kwargs): Although the examples consider only Gaussian peaks, it is possible to change the function factors to edges by passing the index of the known_position through the **funcForm**. Hence, considering three special - points, where there are one gaussian peak and thow edges, the calibrate + points, where there are one gaussian peak and two edges, the calibrate could be configured as .. code-block:: python @@ -597,7 +597,7 @@ def findBadPeakFits(peaksTable, threshold=10): @param peakTable: the table containing fitted peak centers @param threshold: the tolerance on the difference from the mean value - @return A list of expected peak positions and a list of indicies of tubes + @return A list of expected peak positions and a list of indices of tubes to correct """ n = len(peaksTable) @@ -647,7 +647,7 @@ def correctMisalignedTubes(ws, calibrationTable, peaksTable, spec, idealTube, tube are recalculated. @param ws: the workspace to get the tube geometry from - @param calibrationTable: the calibration table ouput from running + @param calibrationTable: the calibration table output from running calibration @param peaksTable: the table containing the fitted peak centers from calibration @@ -819,7 +819,7 @@ class _CalibrationParameterHelper(object): raise RuntimeError( "Wrong argument {0}. " "It expects a number 1 for linear, 2 for quadratic, or 3 for 3rd polinomial order" - "when fitting the pixels positions agains the known positions".format(self.FITPOLIN)) + "when fitting the pixels positions against the known positions".format(self.FITPOLIN)) else: return polin_fit else: @@ -857,12 +857,12 @@ class _CalibrationParameterHelper(object): exclude_short_tubes = float(exclude_short_tubes) except: raise RuntimeError( - "Wrong argument {0}. It expects a float value for the minimun size of tubes to be calibrated". + "Wrong argument {0}. It expects a float value for the minimum size of tubes to be calibrated". format(self.EXCLUDESHORT)) else: return exclude_short_tubes else: - # a tube with length 0 can not be calibrated, this is the minimun value + # a tube with length 0 can not be calibrated, this is the minimum value return 0.0 def _get_plot_tube(self, args): diff --git a/scripts/Calibration/tube_calib.py b/scripts/Calibration/tube_calib.py index b36cf00f609..d3a46e3d0ac 100644 --- a/scripts/Calibration/tube_calib.py +++ b/scripts/Calibration/tube_calib.py @@ -411,7 +411,7 @@ def getCalibratedPixelPositions(ws, tube_positions, ideal_tube_positions, which_ for i in range(n_dets): deti = ws.getDetector(which_tube[i]) p_new = pixels[i] - # again, the opeartion float * v3d is not defined, but v3d * float is, + # again, the operation float * v3d is not defined, but v3d * float is, # so, I wrote the new pos as center + unit_vector * (float) new_pos = center + unit_vector * p_new @@ -475,7 +475,7 @@ def getCalibration(ws, tubeSet, calibTable, fitPar, iTube, peaksTable, :param fitPar: A :class:`~tube_calib_fit_params.TubeCalibFitParams` object for fitting the peaks :param iTube: The :class:`~ideal_tube.IdealTube` which contains the positions in metres of the shadows of the slits, bars or edges used for calibration. - :param peaksTable: Peaks table into wich the peaks positions will be put + :param peaksTable: Peaks table into which the peaks positions will be put :param overridePeaks: dictionary with tube indexes keys and an array of peaks in pixels to override those that would be fitted for one tube :param excludeShortTubes: Exlude tubes shorter than specified length from calibration diff --git a/scripts/Calibration/tube_calib_fit_params.py b/scripts/Calibration/tube_calib_fit_params.py index c96a2e235b0..0458ad4bdec 100644 --- a/scripts/Calibration/tube_calib_fit_params.py +++ b/scripts/Calibration/tube_calib_fit_params.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, division, print_function class TubeCalibFitParams(object): -# This class is to take the fitting method and parameters for fitting the peaks crated by the calibration slits etc +# This class is to take the fitting method and parameters for fitting the peaks created by the calibration slits etc # and to deliver them to TubeCalib, so it can fit the peaks appropriately # Author: Karl Palmen ISIS diff --git a/scripts/Calibration/tube_spec.py b/scripts/Calibration/tube_spec.py index f17a35a541d..9a5959c1fd2 100644 --- a/scripts/Calibration/tube_spec.py +++ b/scripts/Calibration/tube_spec.py @@ -56,7 +56,7 @@ class TubeSpec: """ Define the sets of tube from the workspace. - Sets tube specification by string. The string specifies a component of the intrument + Sets tube specification by string. The string specifies a component of the instrument as in the instrument tree of its IDF file. This component may contain one or more tubes and possibly all the tunes in the instrument. If the tube specification is not empty this component is added to those already @@ -305,7 +305,7 @@ class TubeSpec: firstDet, numDet, step = self.getDetectorInfoFromTube( tubeIx ) wkIds = [] skipped = [] - # print " First dectector", firstDet," Last detector", firstDet+numDet-1, "Number of detectors", numDet + # print " First detector", firstDet," Last detector", firstDet+numDet-1, "Number of detectors", numDet # print "Histograms", self.ws.getNumberHistograms() # First check we have one detector per histogram/workpsaceID/spectrum diff --git a/scripts/DGSPlanner/DGSPlannerGUI.py b/scripts/DGSPlanner/DGSPlannerGUI.py index 3e7c25fc404..2d6d430b207 100644 --- a/scripts/DGSPlanner/DGSPlannerGUI.py +++ b/scripts/DGSPlanner/DGSPlannerGUI.py @@ -244,7 +244,7 @@ class DGSPlannerGUI(QtGui.QWidget): mantid.simpleapi.MaskDetectors(Workspace="__temp_instrument", MaskedWorkspace=__maskWS) except (ValueError, RuntimeError) as e: reply = QtGui.QMessageBox.critical(self, 'Error', - "The following error has occured in loading the mask:\n" + + "The following error has occurred in loading the mask:\n" + str(e) + "\nDo you want to continue without mask?", QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No) diff --git a/scripts/DiamondAttenuationCorrection/FitTrans.py b/scripts/DiamondAttenuationCorrection/FitTrans.py index b4f024fa700..4b83087034a 100644 --- a/scripts/DiamondAttenuationCorrection/FitTrans.py +++ b/scripts/DiamondAttenuationCorrection/FitTrans.py @@ -548,7 +548,7 @@ def showx3(x): ''' %showx displays all parameters for refinement in reasonably intelligible %form - Input : parameter vector and the sets of hkl indices for the diamons + Input : parameter vector and the sets of hkl indices for the diamonds ''' global hkl1, hkl2 global UB1, pkcalcint1 @@ -773,7 +773,7 @@ def SimTrans3(x): % multiplied. I've implemented the change...will see what difference it % makes. % - % M. Guthrie 9 April 2014, introduced possiblity to refine L2 and also a + % M. Guthrie 9 April 2014, introduced possibility to refine L2 and also a % scale factor for calculated dip wavelengths (to account for diamond % compressibility). ''' diff --git a/scripts/FilterEvents/MplFigureCanvas.py b/scripts/FilterEvents/MplFigureCanvas.py index 41176d1e840..b4ace371523 100644 --- a/scripts/FilterEvents/MplFigureCanvas.py +++ b/scripts/FilterEvents/MplFigureCanvas.py @@ -43,6 +43,6 @@ class MplFigureCanvas(FigureCanvas): return def getPlot(self): - """ reture figure's axes to expose the matplotlib figure to PyQt client + """ return figure's axes to expose the matplotlib figure to PyQt client """ return self.axes diff --git a/scripts/FilterEvents/eventFilterGUI.py b/scripts/FilterEvents/eventFilterGUI.py index fa31ac99450..bca40a52f17 100644 --- a/scripts/FilterEvents/eventFilterGUI.py +++ b/scripts/FilterEvents/eventFilterGUI.py @@ -78,7 +78,7 @@ class MainWindow(QtGui.QMainWindow): _errMsgWindow = None def __init__(self, parent=None): - """ Intialization and set up + """ Initialization and set up """ # Base class QtGui.QMainWindow.__init__(self,parent) @@ -882,7 +882,7 @@ class MainWindow(QtGui.QMainWindow): iname = filename.split("_")[0] str_runnumber = filename.split("_")[1] if str_runnumber.isdigit() is True and int(str_runnumber) > 0: - # Acccepted format + # Accepted format ishort = config.getInstrument(iname).shortName() wsname = "%s_%s_event" % (ishort, str_runnumber) else: @@ -927,7 +927,7 @@ class MainWindow(QtGui.QMainWindow): t0 = datetime.datetime.strptime(runstart, "%Y-%m-%dT%H:%M:%S") tf = datetime.datetime.strptime(runstop, "%Y-%m-%dT%H:%M:%S") - # Calcualte + # Calculate dt = tf-t0 timeduration = dt.days*3600*24 + dt.seconds diff --git a/scripts/HFIRPowderReduction/HfirPDReductionControl.py b/scripts/HFIRPowderReduction/HfirPDReductionControl.py index e61547b1baa..4018733bc3e 100644 --- a/scripts/HFIRPowderReduction/HfirPDReductionControl.py +++ b/scripts/HFIRPowderReduction/HfirPDReductionControl.py @@ -175,7 +175,7 @@ class PDRManager(object): return def setProcessedVanadiumData(self, wksp): - """ Set tempory processed vanadium data + """ Set temporary processed vanadium data Arguments: - vanws :: workspace - note :: string as note @@ -185,7 +185,7 @@ class PDRManager(object): return def setProcessedVanadiumDataTemp(self, vanws, note): - """ Set tempory processed vanadium data + """ Set temporary processed vanadium data Arguments: - vanws :: workspace - note :: string as note @@ -583,7 +583,7 @@ class HFIRPDRedControl(object): def mergeReduceSpiceData(self, expno, scannolist, unit, xmin, xmax, binsize): """ Merge and reduce SPICE data files - Arguements: + Arguments: - expscanfilelist: list of 3 tuples: expnumber, scannumber and file name """ # Collect data MD workspaces and monitor MD workspaces diff --git a/scripts/HFIRPowderReduction/HfirPDReductionGUI.py b/scripts/HFIRPowderReduction/HfirPDReductionGUI.py index 23da43ffa00..5c9754121ea 100644 --- a/scripts/HFIRPowderReduction/HfirPDReductionGUI.py +++ b/scripts/HFIRPowderReduction/HfirPDReductionGUI.py @@ -766,7 +766,7 @@ class MainWindow(QtGui.QMainWindow): # Set wavelength to GUI except 'multiple scans' self._set_wavelength(auto_wavelength, wavelength_error, exp_no, scan_no, err_msg) - # Optionally obtain and parse det effecient file + # Optionally obtain and parse det efficient file detector_efficiency_table_ws = self._get_and_parse_det_efficiency_file(van_corr_filename) # Parse SPICE data to MDEventWorkspaces diff --git a/scripts/HFIRPowderReduction/MainWindow.ui b/scripts/HFIRPowderReduction/MainWindow.ui index 36cf466aa8c..8379cce4e1e 100644 --- a/scripts/HFIRPowderReduction/MainWindow.ui +++ b/scripts/HFIRPowderReduction/MainWindow.ui @@ -1154,7 +1154,7 @@ <item> <widget class="QLabel" name="label_10"> <property name="toolTip"> - <string><html><head/><body><p>Scan numbers that are excluded from merging beween 'from' and 'to'</p></body></html></string> + <string><html><head/><body><p>Scan numbers that are excluded from merging between 'from' and 'to'</p></body></html></string> </property> <property name="text"> <string>Excluded Scans</string> diff --git a/scripts/HFIRPowderReduction/MplFigureCanvas.py b/scripts/HFIRPowderReduction/MplFigureCanvas.py index 61a6e5dcd65..bdc51d87c34 100644 --- a/scripts/HFIRPowderReduction/MplFigureCanvas.py +++ b/scripts/HFIRPowderReduction/MplFigureCanvas.py @@ -428,7 +428,7 @@ class Qt4MplCanvas(FigureCanvas): try: self.axes.lines.remove(plot) except ValueError as e: - print("[Error] Plot %s is not in axes.lines which has %d lines. Error mesage: %s" % ( + print("[Error] Plot %s is not in axes.lines which has %d lines. Error message: %s" % ( str(plot), len(self.axes.lines), str(e))) self._lineDict[ikey] = None else: @@ -443,7 +443,7 @@ class Qt4MplCanvas(FigureCanvas): # ENDFOR # Remove legend - # only appied in new version of matplotlib + # only applied in new version of matplotlib # if self._myLegend is not None: # self._myLegend.remove() @@ -486,7 +486,7 @@ class Qt4MplCanvas(FigureCanvas): return self._lineIndex-1 def getPlot(self): - """ reture figure's axes to expose the matplotlib figure to PyQt client + """ return figure's axes to expose the matplotlib figure to PyQt client """ return self.axes @@ -616,7 +616,7 @@ class Qt4MplCanvas(FigureCanvas): def _setupLegend(self, location='best'): """ Set up legend self.axes.legend() - Handler is a Line2D object. Lable maps to the line object + Handler is a Line2D object. Label maps to the line object """ loclist = [ "best", diff --git a/scripts/HFIRPowderReduction/README.md b/scripts/HFIRPowderReduction/README.md index 9799a0393d4..0ed4968105a 100644 --- a/scripts/HFIRPowderReduction/README.md +++ b/scripts/HFIRPowderReduction/README.md @@ -1,7 +1,7 @@ Tasks ----- - 6. Find out why the vanadium runs (379-10/11) look funny, i.e., oscilating curves; + 6. Find out why the vanadium runs (379-10/11) look funny, i.e., oscillating curves; 7. Talk with Clarina how to deal with vanadium spectrum with peaks striped; 8. Tab *Normalized*: **Normalization Monitor** should have a default value as the average of monitor counts 9. Check whether a scan has been loaded as **Load** is pushed; @@ -47,7 +47,7 @@ Use cases for tabs 5. **Vanadium**: strip vanadium peaks * Strip vanadium peak with unit 'Degrees' because of the binning (range and step size) must be respected; * Peaks' position should be calculated and indicated auotmatically; - * *Mantid::StripPeaks()* will be called instread of *StripVadadiumPeaks()* because + * *Mantid::StripPeaks()* will be called instead of *StripVadadiumPeaks()* because the later one only works in d-spacing; 6. **Advanced Setup** * URL for raw data files; @@ -83,7 +83,7 @@ Here is the suggested workflow to reduce multiple scans and possibly merge them. 1. Set up *Exp No* and range of scan numbers; 2. Push button *Load All* to load and reduce all runs specified in previous step to single-spectrum diffraction pattern; 3. Waterfall plot all reduced scans in default; - 4. Optinally plot all data in 2D fill plot; + 4. Optionally plot all data in 2D fill plot; 5. User can delete some scans from the reduced scans via GUI or input text edit; 6. Push button *Merge* to merge the scans; 7. Push button *Save All* to save all individual scans to files; @@ -124,17 +124,17 @@ Raw data correction files - IJK is the experiment number - abc is the GE set up. It can be 113, 115 or 117 - XY is either IN or OUT. - - Exmaple: *HB2A_exp0400__Ge_113_IN_vcorr.txt* + - Example: *HB2A_exp0400__Ge_113_IN_vcorr.txt* * Web address: *http://neutron.ornl.gov/user_data/hb2a/exp400/Datafiles/HB2A_exp0IJK__Ge_abc_IN_vcorr.txt* - IJK is the experiment number - abc is the GE set up. It can be 113, 115 or 117 - XY is either IN or OUT. - - Exmaple: *http://neutron.ornl.gov/user_data/hb2a/exp400/Datafiles/HB2A_exp0400__Ge_113_IN_vcorr.txt* + - Example: *http://neutron.ornl.gov/user_data/hb2a/exp400/Datafiles/HB2A_exp0400__Ge_113_IN_vcorr.txt* - 2. **Excluded detectors**: Some detectors might be exluded from the experiment for some reason. It is recorded in some excluded detectors' file. + 2. **Excluded detectors**: Some detectors might be excluded from the experiment for some reason. It is recorded in some excluded detectors' file. * File name: *HB2A_exp0IJK__exclude_detectors.txt* - IJK is the epxeriment number - - Exmaple: *HB2A_exp0400__exclude_detectors.txt* + - Example: *HB2A_exp0400__exclude_detectors.txt* * Web address: *http://neutron.ornl.gov/user_data/hb2a/expIJK/Datafiles/HB2A_exp0IJK__exclude_detectors.txt* - IJK is the experiment number - Example: *http://neutron.ornl.gov/user_data/hb2a/exp400/Datafiles/HB2A_exp0400__exclude_detectors.txt* diff --git a/scripts/HFIR_4Circle_Reduction/MainWindow.ui b/scripts/HFIR_4Circle_Reduction/MainWindow.ui index 84fd360d6e8..62dad6cdb34 100644 --- a/scripts/HFIR_4Circle_Reduction/MainWindow.ui +++ b/scripts/HFIR_4Circle_Reduction/MainWindow.ui @@ -579,7 +579,7 @@ <string><html><head/><body><p>Directory to save outcome of the data reduction</p></body></html></string> </property> <property name="text"> - <string>Working Direcotry</string> + <string>Working Directory</string> </property> </widget> </item> @@ -3470,7 +3470,7 @@ p, li { white-space: pre-wrap; } </sizepolicy> </property> <property name="toolTip"> - <string><html><head/><body><p>List of scans and possibly Pt numbers.</p><p><br/></p><p>Example 1:</p><p>123, 125-130, 301, 304</p><p>It will integrate all Pts. in each scan</p><p><br/></p><p>Example 2:</p><p>123 (1, 2, 3, 4-10), 125-130, </p><p>It will integrate all Pts. in all scans excpet 123, which will have a selected few to be integrated</p><p><br/></p><p>Example 3:</p><p>123, 125-130, 301, 304 | 1, 2, 3-9</p><p>It will integrate selected Pts. in the previous one</p></body></html></string> + <string><html><head/><body><p>List of scans and possibly Pt numbers.</p><p><br/></p><p>Example 1:</p><p>123, 125-130, 301, 304</p><p>It will integrate all Pts. in each scan</p><p><br/></p><p>Example 2:</p><p>123 (1, 2, 3, 4-10), 125-130, </p><p>It will integrate all Pts. in all scans except 123, which will have a selected few to be integrated</p><p><br/></p><p>Example 3:</p><p>123, 125-130, 301, 304 | 1, 2, 3-9</p><p>It will integrate selected Pts. in the previous one</p></body></html></string> </property> </widget> </item> diff --git a/scripts/HFIR_4Circle_Reduction/fputility.py b/scripts/HFIR_4Circle_Reduction/fputility.py index c0c4fd96986..1508f1abf91 100644 --- a/scripts/HFIR_4Circle_Reduction/fputility.py +++ b/scripts/HFIR_4Circle_Reduction/fputility.py @@ -74,7 +74,7 @@ def load_scd_fullprof_intensity_file(file_name): # line 2 format line, skip continue elif line.endswith('0 0'): - # line 3 as wave lengh line + # line 3 as wave length line wave_length = float(line.split()[0]) elif k_index < num_k_vector: # k-vector line: (num_k_vector) line right after k-indication line diff --git a/scripts/HFIR_4Circle_Reduction/guiutility.py b/scripts/HFIR_4Circle_Reduction/guiutility.py index 16efd7fd6d2..fe363856a41 100644 --- a/scripts/HFIR_4Circle_Reduction/guiutility.py +++ b/scripts/HFIR_4Circle_Reduction/guiutility.py @@ -128,7 +128,7 @@ def map_to_color(data_array, base_color, change_color_flag): color_value = min(1.0 - 1.E-10, color_value) step_list_index += 1 else: - # use bae color + # use base color color_value = base_color[i_color] # ENDIF diff --git a/scripts/HFIR_4Circle_Reduction/hfctables.py b/scripts/HFIR_4Circle_Reduction/hfctables.py index dfee87978f9..294cc7a3ac7 100644 --- a/scripts/HFIR_4Circle_Reduction/hfctables.py +++ b/scripts/HFIR_4Circle_Reduction/hfctables.py @@ -807,7 +807,7 @@ class UBMatrixPeakTable(tableBase.NTableWidget): def set_hkl(self, i_row, hkl, is_spice_hkl, error=None): """ - Set HKL to a row in the table. Show H/K/L with 4 decimal pionts + Set HKL to a row in the table. Show H/K/L with 4 decimal points :param i_row: :param hkl: HKL is a list of tuple :param is_spice_hkl: If true, then set input to cell for SPICE-imported HKL. Otherwise to calculated HKL. diff --git a/scripts/HFIR_4Circle_Reduction/mplgraphicsview.py b/scripts/HFIR_4Circle_Reduction/mplgraphicsview.py index 94085f529f4..485b34ac01a 100644 --- a/scripts/HFIR_4Circle_Reduction/mplgraphicsview.py +++ b/scripts/HFIR_4Circle_Reduction/mplgraphicsview.py @@ -1352,7 +1352,7 @@ class Qt4MplCanvas(FigureCanvas): try: self.axes.lines.remove(plot) except ValueError as e: - print("[Error] Plot %s is not in axes.lines which has %d lines. Error mesage: %s" % ( + print("[Error] Plot %s is not in axes.lines which has %d lines. Error message: %s" % ( str(plot), len(self.axes.lines), str(e))) del self._lineDict[ikey] else: @@ -1421,7 +1421,7 @@ class Qt4MplCanvas(FigureCanvas): return self._lineIndex-1 def getPlot(self): - """ reture figure's axes to expose the matplotlib figure to PyQt client + """ return figure's axes to expose the matplotlib figure to PyQt client """ return self.axes @@ -1664,7 +1664,7 @@ class Qt4MplCanvas(FigureCanvas): def _setup_legend(self, location='best', font_size=10): """ Set up legend - self.axes.legend(): Handler is a Line2D object. Lable maps to the line object + self.axes.legend(): Handler is a Line2D object. Label maps to the line object Args: location: font_size: diff --git a/scripts/HFIR_4Circle_Reduction/peakprocesshelper.py b/scripts/HFIR_4Circle_Reduction/peakprocesshelper.py index 835b24787b7..a455ca06f6d 100644 --- a/scripts/HFIR_4Circle_Reduction/peakprocesshelper.py +++ b/scripts/HFIR_4Circle_Reduction/peakprocesshelper.py @@ -306,7 +306,7 @@ class PeakProcessRecord(object): """ # get PeaksWorkspace if AnalysisDataService.doesExist(self._myPeakWorkspaceName) is False: - raise RuntimeError('PeaksWorkspace %s does ot exit.' % self._myPeakWorkspaceName) + raise RuntimeError('PeaksWorkspace %s does not exist.' % self._myPeakWorkspaceName) peak_ws = AnalysisDataService.retrieve(self._myPeakWorkspaceName) diff --git a/scripts/HFIR_4Circle_Reduction/reduce4circleControl.py b/scripts/HFIR_4Circle_Reduction/reduce4circleControl.py index ae0507f22cc..ddbd9d249b9 100644 --- a/scripts/HFIR_4Circle_Reduction/reduce4circleControl.py +++ b/scripts/HFIR_4Circle_Reduction/reduce4circleControl.py @@ -2198,7 +2198,7 @@ class CWSCDReductionControl(object): 'Center row number {0} of type {1} must either None or non-negative integer.' \ ''.format(center_row, type(center_row)) assert center_col is None or (isinstance(center_col, int) and center_col >= 0), \ - 'Center column number {0} of type {1} must be either Noe or non-negative integer.' \ + 'Center column number {0} of type {1} must be either None or non-negative integer.' \ ''.format(center_col, type(center_col)) if default: diff --git a/scripts/HFIR_4Circle_Reduction/reduce4circleGUI.py b/scripts/HFIR_4Circle_Reduction/reduce4circleGUI.py index 230e56b5261..bce03b27aaa 100644 --- a/scripts/HFIR_4Circle_Reduction/reduce4circleGUI.py +++ b/scripts/HFIR_4Circle_Reduction/reduce4circleGUI.py @@ -454,7 +454,7 @@ class MainWindow(QtGui.QMainWindow): # about pre-processed data self.ui.checkBox_searchPreprocessedFirst.setChecked(True) - # hide and disable some push buttons for future implemetation + # hide and disable some push buttons for future implementation self.ui.pushButton_viewScan3D.hide() self.ui.pushButton_plotSelectedData.hide() @@ -495,7 +495,7 @@ class MainWindow(QtGui.QMainWindow): try: calculated_hkl = self.ui.tableWidget_peaksCalUB.get_hkl(i_row, False) except RuntimeError as run_err: - errmsg = '[ERROR] Failed to get calculated HKL from UB calcualtion table due to {0}'.format(run_err) + errmsg = '[ERROR] Failed to get calculated HKL from UB calculation table due to {0}'.format(run_err) self.pop_one_button_dialog(errmsg) return None peak_info.set_hkl_np_array(numpy.array(calculated_hkl)) @@ -3681,7 +3681,7 @@ class MainWindow(QtGui.QMainWindow): def save_settings(self): """ - Save settings (parameter set) upon quiting + Save settings (parameter set) upon quitting :return: """ settings = QtCore.QSettings() diff --git a/scripts/HFIR_4Circle_Reduction/refineubfftsetup.py b/scripts/HFIR_4Circle_Reduction/refineubfftsetup.py index 0c5ef026dcc..4c7a240d95d 100644 --- a/scripts/HFIR_4Circle_Reduction/refineubfftsetup.py +++ b/scripts/HFIR_4Circle_Reduction/refineubfftsetup.py @@ -30,7 +30,7 @@ class RefineUBFFTSetupDialog(QtGui.QDialog): self.ui.lineEdit_maxD.setText('40.0') self.ui.lineEdit_tolerance.setText('0.15') - # connected to event hanlder + # connected to event handler self.connect(self.ui.buttonBox, QtCore.SIGNAL('accepted()'), self.do_ok) diff --git a/scripts/HFIR_4Circle_Reduction/viewspicedialog.py b/scripts/HFIR_4Circle_Reduction/viewspicedialog.py index 3df33e25710..ce299455800 100644 --- a/scripts/HFIR_4Circle_Reduction/viewspicedialog.py +++ b/scripts/HFIR_4Circle_Reduction/viewspicedialog.py @@ -5,7 +5,7 @@ from PyQt4 import QtGui class ViewSpiceDialog(QtGui.QDialog): - """Dialog ot view SPICE """ + """Dialog to view SPICE """ def __init__(self, parent): """Initialization diff --git a/scripts/Inelastic/CrystalField/fitting.py b/scripts/Inelastic/CrystalField/fitting.py index 34c8e97ecd0..0f56286573b 100644 --- a/scripts/Inelastic/CrystalField/fitting.py +++ b/scripts/Inelastic/CrystalField/fitting.py @@ -182,7 +182,7 @@ class CrystalField(object): if 'ResolutionModel' in kwargs and 'FWHM' in kwargs: msg = 'Both ''ResolutionModel'' and ''FWHM'' specified but can only accept one width option.' - msg += ' Prefering to use ResolutionModel, and ignoring FWHM.' + msg += ' Preferring to use ResolutionModel, and ignoring FWHM.' kwargs.pop('FWHM') warnings.warn(msg, SyntaxWarning) diff --git a/scripts/Inelastic/Direct/DirectEnergyConversion.py b/scripts/Inelastic/Direct/DirectEnergyConversion.py index afb0d4555aa..dde30a0ca61 100644 --- a/scripts/Inelastic/Direct/DirectEnergyConversion.py +++ b/scripts/Inelastic/Direct/DirectEnergyConversion.py @@ -1922,7 +1922,7 @@ def get_failed_spectra_list_from_masks(masked_wksp,prop_man): try: masked_wksp.name() #pylint: disable=broad-except - except Exeption: + except Exception: prop_man.log("***WARNING: cached mask workspace invalidated. Incorrect masking reported") return (failed_spectra,0) diff --git a/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py b/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py index 5f4424188da..e9512fb0d86 100644 --- a/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py +++ b/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py @@ -328,7 +328,7 @@ class UserProperties(object): error = True if error: raise RuntimeError("Experiment start date should be defined as" - " a sting in the form YYYYMMDD or YYMMDD but it is: {0}".format(start_date)) + " a string in the form YYYYMMDD or YYMMDD but it is: {0}".format(start_date)) return start_date def get_all_instruments(self): diff --git a/scripts/Inelastic/Direct/NonIDF_Properties.py b/scripts/Inelastic/Direct/NonIDF_Properties.py index 2029ade3f5b..f8c16aa3078 100644 --- a/scripts/Inelastic/Direct/NonIDF_Properties.py +++ b/scripts/Inelastic/Direct/NonIDF_Properties.py @@ -164,7 +164,7 @@ class NonIDF_Properties(object): def mapmask_ref_ws(self): """Property provides reference workspace for LoadMask and GroupWorkspace algorithms - on 26/07/2016 refernce workspace (a workspace which provides appropriate + on 26/07/2016 reference workspace (a workspace which provides appropriate spectra-detector mapping was implemented for LoadMask algorithm only. """ return self._mapmask_ref_ws diff --git a/scripts/Inelastic/Direct/PropertyManager.py b/scripts/Inelastic/Direct/PropertyManager.py index e97704ffb4a..d3f423248f7 100644 --- a/scripts/Inelastic/Direct/PropertyManager.py +++ b/scripts/Inelastic/Direct/PropertyManager.py @@ -627,7 +627,7 @@ class PropertyManager(NonIDF_Properties): missing=[] #pylint: disable=unused-variable ok,missing,found=self.find_files_to_sum() - #Presence of Cashe sum ws assumes that you sum files to workspace as they appear + #Presence of cashe_sum_ws assumes that you sum files to workspace as they appear # This mean, that we should not expect all files to be there at the beginning if not ok and not self.cashe_sum_ws: file_errors['missing_runs_toSum']=str(missing) diff --git a/scripts/Inelastic/Direct/ReductionHelpers.py b/scripts/Inelastic/Direct/ReductionHelpers.py index de58a85f018..9fc457ac27b 100644 --- a/scripts/Inelastic/Direct/ReductionHelpers.py +++ b/scripts/Inelastic/Direct/ReductionHelpers.py @@ -399,7 +399,7 @@ def parse_run_file_name(run_string): def process_prop_list(workspace,logName="CombinedSpectraIDList"): - """Method process log, which discribes list of spectra, attached to + """Method process log, which describes list of spectra, attached to the workspace """ if workspace.run().hasProperty(logName): diff --git a/scripts/Inelastic/Direct/ReductionWrapper.py b/scripts/Inelastic/Direct/ReductionWrapper.py index 4d233fedf1f..39252b58a39 100644 --- a/scripts/Inelastic/Direct/ReductionWrapper.py +++ b/scripts/Inelastic/Direct/ReductionWrapper.py @@ -662,7 +662,7 @@ def AdvancedProperties(adv_prop_definition): def iliad(reduce): """ This decorator wraps around main procedure and switch input from - web variables to properties or vise versa depending on web variables + web variables to properties or vice versa depending on web variables presence """ def iliad_wrapper(*args): diff --git a/scripts/Inelastic/Direct/RunDescriptor.py b/scripts/Inelastic/Direct/RunDescriptor.py index f7484accd2f..c9bb2622743 100644 --- a/scripts/Inelastic/Direct/RunDescriptor.py +++ b/scripts/Inelastic/Direct/RunDescriptor.py @@ -934,7 +934,7 @@ class RunDescriptor(PropDescriptor): mon_list = [monitors_ID] else: mon_list = self._holder.get_used_monitors_list() - # Check if all requested spectra are indeed availible + # Check if all requested spectra are indeed available for monID in mon_list: if monID in combined_spec_list: continue diff --git a/scripts/Inelastic/Direct/__init__.py b/scripts/Inelastic/Direct/__init__.py index 9b6fd7146a9..d6b9570b010 100644 --- a/scripts/Inelastic/Direct/__init__.py +++ b/scripts/Inelastic/Direct/__init__.py @@ -1,4 +1,4 @@ -""" Classes and funcions exported from Direct Reduction Package: +""" Classes and functions exported from Direct Reduction Package: dgreduce -- outdated functions, provided for compartibility with old qtiGenie DirectEnergyConversion -- main reduction class diff --git a/scripts/Inelastic/Direct/dgreduce.py b/scripts/Inelastic/Direct/dgreduce.py index 5ba53a7d273..288d75c1c4a 100644 --- a/scripts/Inelastic/Direct/dgreduce.py +++ b/scripts/Inelastic/Direct/dgreduce.py @@ -76,7 +76,7 @@ def arb_units(wb_run,sample_run,ei_guess,rebin,map_file='default',monovan_run=No ,diag_remove_zero=False,norm_method='current') - type help() for the list of all available keywords. All availible keywords are provided in InstName_Parameters.xml file + type help() for the list of all available keywords. All available keywords are provided in InstName_Parameters.xml file Some samples are: diff --git a/scripts/Inelastic/IndirectBayes.py b/scripts/Inelastic/IndirectBayes.py index 334e803b3a2..80c94ab0d83 100644 --- a/scripts/Inelastic/IndirectBayes.py +++ b/scripts/Inelastic/IndirectBayes.py @@ -2,7 +2,7 @@ """ Bayes routines -Fortran programs use fixed length arrays whereas Python has variable lenght lists +Fortran programs use fixed length arrays whereas Python has variable length lists Input : the Python list is padded to Fortrans length using procedure PadArray Output : the Fortran numpy array is sliced to Python length using dataY = yout[:ny] """ @@ -40,7 +40,7 @@ def CalcErange(inWS,ns,erange,binWidth): rangeMask = (Xdata >= erange[0]) & (Xdata <= erange[1]) Xin = Xdata[rangeMask] - #get indicies of the bounds of our energy range + #get indices of the bounds of our energy range minIndex = np.where(Xdata==Xin[0])[0][0]+1 maxIndex = np.where(Xdata==Xin[-1])[0][0] @@ -84,7 +84,7 @@ def ResNormRun(vname,rname,erange,nbin,Plot='None',Save=False): nvan,ntc = CheckHistZero(vname) theta = GetThetaQ(vname)[0] efix = getEfixed(vname) - print("begining erange calc") + print("beginning erange calc") nout,bnorm,Xdat,Xv,Yv,Ev = CalcErange(vname,0,erange,nbin) print("end of erange calc") Ndat = nout[0] diff --git a/scripts/Inelastic/IndirectCommon.py b/scripts/Inelastic/IndirectCommon.py index 3c3f210144c..5474bf79733 100644 --- a/scripts/Inelastic/IndirectCommon.py +++ b/scripts/Inelastic/IndirectCommon.py @@ -395,7 +395,7 @@ def getInstrumentParameter(ws, param_name): inst = s_api.mtd[ws].getInstrument() # Create a map of type parameters to functions. This is so we avoid writing lots of - # if statements becuase there's no way to dynamically get the type. + # if statements because there's no way to dynamically get the type. func_map = {'double': inst.getNumberParameter, 'string': inst.getStringParameter, 'int': inst.getIntParameter, 'bool': inst.getBoolParameter} @@ -490,7 +490,7 @@ def transposeFitParametersTable(params_table, output_table=None): def IndentifyDataBoundaries(sample_ws): """ - Indentifies and returns the first and last no zero data point in a workspace + Identifies and returns the first and last no zero data point in a workspace For multiple workspace spectra, the data points that are closest to the centre out of all the spectra in the workspace are returned diff --git a/scripts/Inelastic/vesuvio/commands.py b/scripts/Inelastic/vesuvio/commands.py index 32de48bb47f..a18122fd96b 100644 --- a/scripts/Inelastic/vesuvio/commands.py +++ b/scripts/Inelastic/vesuvio/commands.py @@ -258,7 +258,7 @@ class VesuvioTOFFitRoutineIteration(object): class VesuvioMSHelper(object): """ - A helper class for storing and manipulating the multiple scattering paramaters of + A helper class for storing and manipulating the multiple scattering parameters of the Vesuvio TOF Fit Routine. Attributes: diff --git a/scripts/Interface/reduction_gui/reduction/sans/hfir_options_script.py b/scripts/Interface/reduction_gui/reduction/sans/hfir_options_script.py index 97ba2a4da97..b00af8fa58d 100644 --- a/scripts/Interface/reduction_gui/reduction/sans/hfir_options_script.py +++ b/scripts/Interface/reduction_gui/reduction/sans/hfir_options_script.py @@ -15,7 +15,7 @@ class ReductionOptions(BaseScriptElement): ny_pixels = 192 pixel_size = 5.1 - # Absoulte scale + # Absolute scale scaling_factor = 1.0 calculate_scale = False scaling_direct_file = '' diff --git a/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_adv_setup.py b/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_adv_setup.py index b0d709ef8f9..9a32c96137b 100644 --- a/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_adv_setup.py +++ b/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_adv_setup.py @@ -99,8 +99,8 @@ class AdvancedSetupWidget(BaseWidget): self.connect(self._content.help_button, QtCore.SIGNAL("clicked()"), self._show_help) - # Hanlder for events - # TODO - Need to add an event hanlder for the change of instrument and facility + # Handler for events + # TODO - Need to add an event handler for the change of instrument and facility # Validated widgets diff --git a/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_run_setup.py b/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_run_setup.py index 95d268b6992..abca9cee7df 100644 --- a/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_run_setup.py +++ b/scripts/Interface/reduction_gui/widgets/diffraction/diffraction_run_setup.py @@ -314,7 +314,7 @@ class RunSetupWidget(BaseWidget): return s def _calfile_browse(self): - """ Event handing for browsing calibrtion file + """ Event handing for browsing calibration file """ fname = self.data_browse_dialog(data_type="*.h5;;*.cal;;*.hd5;;*.hdf;;*") if fname: @@ -323,7 +323,7 @@ class RunSetupWidget(BaseWidget): return def _charfile_browse(self): - """ Event handing for browsing calibrtion file + """ Event handing for browsing calibration file """ fname = self.data_browse_dialog("*.txt;;*", multi=True) if fname: @@ -439,7 +439,7 @@ class RunSetupWidget(BaseWidget): return True, '', intliststring def _overrideemptyrun_clicked(self): - """ Handling event if overriding emptry run + """ Handling event if overriding empty run """ if self._content.override_emptyrun_checkBox.isChecked() is True: self._content.emptyrun_edit.setEnabled(True) @@ -451,7 +451,7 @@ class RunSetupWidget(BaseWidget): return def _overridevanrun_clicked(self): - """ Handling event if overriding emptry run + """ Handling event if overriding empty run """ if self._content.override_vanrun_checkBox.isChecked() is True: self._content.vanrun_edit.setEnabled(True) @@ -463,7 +463,7 @@ class RunSetupWidget(BaseWidget): return def _overridevanbkgdrun_clicked(self): - """ Handling event if overriding emptry run + """ Handling event if overriding empty run """ if self._content.override_vanbkgdrun_checkBox.isChecked() is True: self._content.vanbkgdrun_edit.setEnabled(True) diff --git a/scripts/Interface/ui/diffraction/diffraction_adv_setup.ui b/scripts/Interface/ui/diffraction/diffraction_adv_setup.ui index 97deb39038c..87e5d2a0a64 100644 --- a/scripts/Interface/ui/diffraction/diffraction_adv_setup.ui +++ b/scripts/Interface/ui/diffraction/diffraction_adv_setup.ui @@ -435,7 +435,7 @@ <item row="4" column="1"> <widget class="QLineEdit" name="scaledata_edit"> <property name="toolTip"> - <string>Constant to multiply the data by before writting out</string> + <string>Constant to multiply the data by before writing out</string> </property> </widget> </item> @@ -461,7 +461,7 @@ </size> </property> <property name="text"> - <string>Minumum Cropped Wavelength</string> + <string>Minimum Cropped Wavelength</string> </property> </widget> </item> diff --git a/scripts/Interface/ui/diffraction/diffraction_run_setup.ui b/scripts/Interface/ui/diffraction/diffraction_run_setup.ui index 020bcbb9da0..4ce255bd7ba 100644 --- a/scripts/Interface/ui/diffraction/diffraction_run_setup.ui +++ b/scripts/Interface/ui/diffraction/diffraction_run_setup.ui @@ -726,7 +726,7 @@ </property> <property name="text"> <string>If characterization file is given, the correction run numbers are given by the file. -The corrections can be overriden and disabled though.</string> +The corrections can be overridden and disabled though.</string> </property> </widget> </item> @@ -737,7 +737,7 @@ The corrections can be overriden and disabled though.</string> <item row="0" column="3"> <widget class="QCheckBox" name="disablebkgdcorr_chkbox"> <property name="toolTip"> - <string><html><head/><body><p>Disable emptry/background correction.</p></body></html></string> + <string><html><head/><body><p>Disable empty/background correction.</p></body></html></string> </property> <property name="statusTip"> <string>Select to set the detector distance offset.</string> diff --git a/scripts/Interface/ui/reflectometer/refl_gui.py b/scripts/Interface/ui/reflectometer/refl_gui.py index 5f37b1a2cfc..848268962cd 100644 --- a/scripts/Interface/ui/reflectometer/refl_gui.py +++ b/scripts/Interface/ui/reflectometer/refl_gui.py @@ -276,7 +276,7 @@ We recommend you use ISIS Reflectometry instead, If this is not possible contact def _reset_table(self): """ - Reset the plot buttons and stitch checkboxes back to thier defualt state + Reset the plot buttons and stitch checkboxes back to their default state """ # switches from current to true, to false to make sure stateChanged fires self.checkTickAll.setCheckState(2) diff --git a/scripts/Interface/ui/reflectometer/refl_save.py b/scripts/Interface/ui/reflectometer/refl_save.py index 6bd68612da3..8cf2ef782d3 100644 --- a/scripts/Interface/ui/reflectometer/refl_save.py +++ b/scripts/Interface/ui/reflectometer/refl_save.py @@ -314,7 +314,7 @@ class Ui_SaveWindow(object): except: print("Journal does not exist or is unreachable, please check your network connection.") -#--------- If "Save" button pressed, selcted workspaces are saved ------------- +#--------- If "Save" button pressed, selected workspaces are saved ------------- def buttonClickHandler1(self): prefix = str(self.lineEdit2.text()) if not (self.lineEdit.text() and os.path.exists(self.lineEdit.text())): diff --git a/scripts/Interface/ui/sans_isis/masking_table.ui b/scripts/Interface/ui/sans_isis/masking_table.ui index 29da7e2fb99..d79aeb097c6 100644 --- a/scripts/Interface/ui/sans_isis/masking_table.ui +++ b/scripts/Interface/ui/sans_isis/masking_table.ui @@ -72,7 +72,7 @@ <item row="2" column="1"> <widget class="QPushButton" name="display_mask_push_button"> <property name="toolTip"> - <string><html><head/><body><p>Displays the masked scatter sample workspace in the InstrumentView. Note that the generation of the InstrumentView migth take several seconds.</p></body></html></string> + <string><html><head/><body><p>Displays the masked scatter sample workspace in the InstrumentView. Note that the generation of the InstrumentView might take several seconds.</p></body></html></string> </property> <property name="text"> <string>Display Mask</string> diff --git a/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui b/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui index c4a4c077f9c..71c7904da94 100644 --- a/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui +++ b/scripts/Interface/ui/sans_isis/sans_data_processor_window.ui @@ -415,7 +415,7 @@ QGroupBox::title { <string><html><head/><body><p>The save locations for the output of batch reductions are: Memory (RAM), File (Hard disk), Both (RAM and Hard disk).</p></body></html></string> </property> <property name="text"> - <string>Memor&y</string> + <string>Memory&y</string> </property> <property name="checked"> <bool>false</bool> @@ -582,7 +582,7 @@ QGroupBox::title { <item row="0" column="0"> <widget class="QLabel" name="reduction_mode_label"> <property name="toolTip"> - <string><html><head/><body><p>The reduction mode. This can be either of the banks of your instrument. In the case of two banks there is also the <span style=" font-style:italic;">Merged</span> and <span style=" font-style:italic;">All</span> mode. <span style=" font-style:italic;">Merged</span> mode stitches the reductions from two banks together. <span style=" font-style:italic;">All</span> mode reduces both banks.</p><p>Note that by default the entries are <span style=" font-style:italic;">LAB</span>, <span style=" font-style:italic;">HAB</span>, <span style=" font-style:italic;">Merged</span>, <span style=" font-style:italic;">All</span>. Once you have specifed data in the batch table, the entry names will be updated to reflect the naming of your instrument.</p></body></html></string> + <string><html><head/><body><p>The reduction mode. This can be either of the banks of your instrument. In the case of two banks there is also the <span style=" font-style:italic;">Merged</span> and <span style=" font-style:italic;">All</span> mode. <span style=" font-style:italic;">Merged</span> mode stitches the reductions from two banks together. <span style=" font-style:italic;">All</span> mode reduces both banks.</p><p>Note that by default the entries are <span style=" font-style:italic;">LAB</span>, <span style=" font-style:italic;">HAB</span>, <span style=" font-style:italic;">Merged</span>, <span style=" font-style:italic;">All</span>. Once you have specified data in the batch table, the entry names will be updated to reflect the naming of your instrument.</p></body></html></string> </property> <property name="text"> <string>Reduction Mode</string> @@ -592,7 +592,7 @@ QGroupBox::title { <item row="0" column="1"> <widget class="QComboBox" name="reduction_mode_combo_box"> <property name="toolTip"> - <string><html><head/><body><p>The reduction mode. This can be either of the banks of your instrument. In the case of two banks there is also the <span style=" font-style:italic;">Merged</span> and <span style=" font-style:italic;">All</span> mode. <span style=" font-style:italic;">Merged</span> mode stitches the reductions from two banks together. <span style=" font-style:italic;">All</span> mode reduces both banks.</p><p>Note that by default the entries are <span style=" font-style:italic;">LAB</span>, <span style=" font-style:italic;">HAB</span>, <span style=" font-style:italic;">Merged</span>, <span style=" font-style:italic;">All</span>. Once you have specifed data in the batch table, the entry names will be updated to reflect the naming of your instrument.</p></body></html></string> + <string><html><head/><body><p>The reduction mode. This can be either of the banks of your instrument. In the case of two banks there is also the <span style=" font-style:italic;">Merged</span> and <span style=" font-style:italic;">All</span> mode. <span style=" font-style:italic;">Merged</span> mode stitches the reductions from two banks together. <span style=" font-style:italic;">All</span> mode reduces both banks.</p><p>Note that by default the entries are <span style=" font-style:italic;">LAB</span>, <span style=" font-style:italic;">HAB</span>, <span style=" font-style:italic;">Merged</span>, <span style=" font-style:italic;">All</span>. Once you have specified data in the batch table, the entry names will be updated to reflect the naming of your instrument.</p></body></html></string> </property> </widget> </item> @@ -675,7 +675,7 @@ QGroupBox::title { <item row="2" column="0"> <widget class="QCheckBox" name="merged_scale_use_fit_check_box"> <property name="toolTip"> - <string><html><head/><body><p>If checked hten the scale will be fit during the merge operation.</p></body></html></string> + <string><html><head/><body><p>If checked then the scale will be fit during the merge operation.</p></body></html></string> </property> <property name="text"> <string>Use Fit</string> @@ -685,7 +685,7 @@ QGroupBox::title { <item row="2" column="1"> <widget class="QCheckBox" name="merged_shift_use_fit_check_box"> <property name="toolTip"> - <string><html><head/><body><p>If checked hten the shift will be fit during the merge operation.</p></body></html></string> + <string><html><head/><body><p>If checked then the shift will be fit during the merge operation.</p></body></html></string> </property> <property name="text"> <string>Use Fit</string> @@ -756,7 +756,7 @@ QGroupBox::title { <item> <widget class="QGroupBox" name="slice_event_group_box"> <property name="toolTip"> - <string><html><head/><body><p>In the case of data which was measured in event-mode, it is possible to perform time-of-flight slices of the data and reduce these separately.</p><p>Input can be:</p><p>-<span style=" font-style:italic;"> start:step:stop</span> specifies time slices from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop </span>value in steps of <span style=" font-style:italic;">step</span></p><p>- <span style=" font-style:italic;">start-stop </span>which specifies a time slice from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop</span> value</p><p>- <span style=" font-style:italic;">&gt;start</span> specifies a slice from the <span style=" font-style:italic;">start </span>value to the end of the data set</p><p>- <span style=" font-style:italic;">&lt;stop</span> specifes a slice from the start of the data set to the <span style=" font-style:italic;">stop </span>value</p><p>In addition it is possible to concatenate these specifications useing comma-separation. An example is:</p><p><span style=" font-style:italic;">5-10,12:2:16,20-30</span></p></body></html></string> + <string><html><head/><body><p>In the case of data which was measured in event-mode, it is possible to perform time-of-flight slices of the data and reduce these separately.</p><p>Input can be:</p><p>-<span style=" font-style:italic;"> start:step:stop</span> specifies time slices from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop </span>value in steps of <span style=" font-style:italic;">step</span></p><p>- <span style=" font-style:italic;">start-stop </span>which specifies a time slice from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop</span> value</p><p>- <span style=" font-style:italic;">&gt;start</span> specifies a slice from the <span style=" font-style:italic;">start </span>value to the end of the data set</p><p>- <span style=" font-style:italic;">&lt;stop</span> specifes a slice from the start of the data set to the <span style=" font-style:italic;">stop </span>value</p><p>In addition it is possible to concatenate these specifications using comma-separation. An example is:</p><p><span style=" font-style:italic;">5-10,12:2:16,20-30</span></p></body></html></string> </property> <property name="title"> <string>Event Slice</string> @@ -1756,7 +1756,7 @@ QGroupBox::title { <item row="1" column="0"> <widget class="QLabel" name="label_7"> <property name="toolTip"> - <string><html><head/><body><p>It is possible to perform wavelength slices of the data and reduce these separately.</p><p>Input can be:</p><p>-<span style=" font-style:italic;"> start:step:stop</span> specifies wavelength slices from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop </span>value in steps of <span style=" font-style:italic;">step</span></p><p>- <span style=" font-style:italic;">start-stop </span>which specifies a wavelength slice from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop</span> value</p><p>- <span style=" font-style:italic;">&gt;start</span> specifies a slice from the <span style=" font-style:italic;">start </span>value to the end of the data set</p><p>- <span style=" font-style:italic;">&lt;stop</span> specifes a slice from the start of the data set to the <span style=" font-style:italic;">stop </span>value</p><p>In addition it is possible to concatenate these specifications useing comma-separation. An example is:</p><p><span style=" font-style:italic;">5-10,12:2:16,20-30</span></p><p>A reduction will always be done between the maximum and minimum wavelengths of a given set.</p></body></html></string> + <string><html><head/><body><p>It is possible to perform wavelength slices of the data and reduce these separately.</p><p>Input can be:</p><p>-<span style=" font-style:italic;"> start:step:stop</span> specifies wavelength slices from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop </span>value in steps of <span style=" font-style:italic;">step</span></p><p>- <span style=" font-style:italic;">start-stop </span>which specifies a wavelength slice from the <span style=" font-style:italic;">start</span> value to the <span style=" font-style:italic;">stop</span> value</p><p>- <span style=" font-style:italic;">&gt;start</span> specifies a slice from the <span style=" font-style:italic;">start </span>value to the end of the data set</p><p>- <span style=" font-style:italic;">&lt;stop</span> specifes a slice from the start of the data set to the <span style=" font-style:italic;">stop </span>value</p><p>In addition it is possible to concatenate these specifications using comma-separation. An example is:</p><p><span style=" font-style:italic;">5-10,12:2:16,20-30</span></p><p>A reduction will always be done between the maximum and minimum wavelengths of a given set.</p></body></html></string> </property> <property name="text"> <string>Ranges [Ã…]</string> diff --git a/scripts/LargeScaleStructures/data_stitching.py b/scripts/LargeScaleStructures/data_stitching.py index a87502228de..4e9c4733a79 100644 --- a/scripts/LargeScaleStructures/data_stitching.py +++ b/scripts/LargeScaleStructures/data_stitching.py @@ -271,7 +271,7 @@ class DataSet(object): def load(self, update_range=False, restricted_range=False): """ Load a data set from file - @param upate_range: if True, the Q range of the data set will be udpated + @param upate_range: if True, the Q range of the data set will be updated @param restricted_range: if True, zeros at the beginning and end will be stripped """ if os.path.isfile(self._file_path): diff --git a/scripts/LargeScaleStructures/geometry_writer.py b/scripts/LargeScaleStructures/geometry_writer.py index 0736201be54..8f986f55c84 100644 --- a/scripts/LargeScaleStructures/geometry_writer.py +++ b/scripts/LargeScaleStructures/geometry_writer.py @@ -390,7 +390,7 @@ class MantidGeom(object): step2, ...]. If no step is required, use None. """ if len(idlist) % 3 != 0: - raise IndexError("Please specifiy list as [start1, end1, step1, " + raise IndexError("Please specify list as [start1, end1, step1, " + "start2, end2, step2, ...]. If no step is" + "required, use None.") num_ids = len(idlist) / 3 diff --git a/scripts/Muon/GUI/ElementalAnalysis/Plotting/plotting_view.py b/scripts/Muon/GUI/ElementalAnalysis/Plotting/plotting_view.py index 1e93d7872dd..8d5180cfc4c 100644 --- a/scripts/Muon/GUI/ElementalAnalysis/Plotting/plotting_view.py +++ b/scripts/Muon/GUI/ElementalAnalysis/Plotting/plotting_view.py @@ -248,7 +248,7 @@ class PlotView(QtWidgets.QWidget): self.workspace_plots[name] = lines def plot_workspace_errors(self, name, workspace): - """ Plots a workspace with errrors, and appends caps/bars to the subplot list. """ + """ Plots a workspace with errors, and appends caps/bars to the subplot list. """ subplot = self.get_subplot(name) line, cap_lines, bar_lines = plots.plotfunctions.errorbar( subplot, workspace, specNum=1) diff --git a/scripts/Muon/MaxentTools/multimaxalpha.py b/scripts/Muon/MaxentTools/multimaxalpha.py index 680204cfd81..a26f21346d5 100644 --- a/scripts/Muon/MaxentTools/multimaxalpha.py +++ b/scripts/Muon/MaxentTools/multimaxalpha.py @@ -54,7 +54,7 @@ def MULTIMAX( else: (SENSE_phi, DETECT_a, DETECT_b, AMPS_amp) = MODAB(RUNDATA_hists, datum, sigma, MISSCHANNELS_mm, MAXPAGE_f, PULSESHAPE_convol, DETECT_e, SAVETIME_i2, mylog) - # outout per-iteration debug info + # output per-iteration debug info if(phaseconvWS): offset = 0 for k in range(POINTS_ngroups+len(deadDetectors)): diff --git a/scripts/PyChop/ISISDisk.py b/scripts/PyChop/ISISDisk.py index 56a0455228f..3392c518a82 100644 --- a/scripts/PyChop/ISISDisk.py +++ b/scripts/PyChop/ISISDisk.py @@ -59,7 +59,7 @@ class ISISDisk: self.samp_det = 3.5 # sample to detector distance in m self.chop_samp = 1.5 # final chopper to sample distance self.source_rep = 10 # rep rate of source - self.tmod = 3500 # maximimum emmision window from moderator in us + self.tmod = 3500 # maximum emission window from moderator in us self.frac_ei = 0.90 # fraction of Ei to plot energy loss lines self.Chop2Phase = 5 # Phase delay time in usec for chopper 2 (T0/frame overlap chopper) elif 'MERLIN' in instname: @@ -210,7 +210,7 @@ class ISISDisk: def getEi(self): """ - Returns the focussed incident energy in meV + Returns the focused incident energy in meV """ return self.Ei diff --git a/scripts/PyChop/ISISFermi.py b/scripts/PyChop/ISISFermi.py index 1b49160c4ab..7a33e0ba6db 100644 --- a/scripts/PyChop/ISISFermi.py +++ b/scripts/PyChop/ISISFermi.py @@ -236,7 +236,7 @@ class ISISFermi: Inputs: ei - incident energy in meV [default: preset incident energy] - omega - chopper frequncy in Hz [default: preset frequency] + omega - chopper frequency in Hz [default: preset frequency] etrans - list of numpy array of energy transfers to calculate for (meV) [default: 0] Output: @@ -343,7 +343,7 @@ class ISISFermi: Inputs: etrans - list of numpy array of energy transfers to calculate for (meV) [default: linspace(0.05Ei, 0.95Ei, 19)] ei - incident energy in meV [default: preset energy] - omega - chopper frequncy in Hz [default: preset frequency] + omega - chopper frequency in Hz [default: preset frequency] Output: van - the incoherent (Vanadium) energy width at etrans in meV diff --git a/scripts/PyChop/Instruments.py b/scripts/PyChop/Instruments.py index 35bdb92cd89..a24bf6ffc45 100644 --- a/scripts/PyChop/Instruments.py +++ b/scripts/PyChop/Instruments.py @@ -243,7 +243,7 @@ class ChopperSystem(object): return self.frequency def setEi(self, Ei): - """Sets the (focussed) incident energy""" + """Sets the (focused) incident energy""" self.ei = Ei def getEi(self): @@ -570,7 +570,7 @@ class Moderator(object): return np.sqrt(self.getAnalyticWidthSquared(Ei)) def getFlux(self, Ei): - """ Returns the white beam flux estimate from either measured data (prefered) or analytical model (backup) """ + """ Returns the white beam flux estimate from either measured data (preferred) or analytical model (backup) """ return self.getMeasuredFlux(Ei) if hasattr(self, 'flux_interp') else self.getAnalyticFlux(Ei) def getAnalyticFlux(self, Ei): @@ -755,7 +755,7 @@ class Instrument(object): Inputs: etrans - list of numpy array of energy transfers to calculate for (meV) [default: linspace(0.05Ei, 0.95Ei, 19)] ei - incident energy in meV [default: preset energy] - omega - chopper frequncy in Hz [default: preset frequency] + omega - chopper frequency in Hz [default: preset frequency] Output: van - the incoherent (Vanadium) energy FWHM at etrans in meV diff --git a/scripts/PyChop/MulpyRep.py b/scripts/PyChop/MulpyRep.py index d873517232c..db91c06c785 100644 --- a/scripts/PyChop/MulpyRep.py +++ b/scripts/PyChop/MulpyRep.py @@ -164,7 +164,7 @@ def calcChopTimes(efocus, freq, instrumentpars, chop2Phase=5): """ A method to calculate the various possible incident energies with a given chopper setup on LET. The window of energy transfers plotted is 85% by default. - efocus: The incident enrgy that all choppers are focussed on + efocus: The incident enrgy that all choppers are focused on freq1: The frequency of the resolution choppers freqpr: frequency of the pulse removal chopper instrumentpars: a list of instrument parameters [see ISISDisk.py] @@ -255,6 +255,6 @@ def calcChopTimes(efocus, freq, instrumentpars, chop2Phase=5): if lines: for line in lines: lines_all.append(line) - # ok, now we know the possible neutron velocities. we now ned their energies + # ok, now we know the possible neutron velocities. we now need their energies Ei = calcEnergy(lines_all, (dist[-1]+chop_samp)) return Ei, chop_times, [chop_times[0][0], chop_times[-1][0]], dist[-1]-dist[0], lines_all diff --git a/scripts/PyChop/let.yaml b/scripts/PyChop/let.yaml index 81826a98c69..24ce8ff4e27 100644 --- a/scripts/PyChop/let.yaml +++ b/scripts/PyChop/let.yaml @@ -1,6 +1,6 @@ name: LET # Input file for PyChop2 for the LET spectrometer at ISIS. -# At a minium, the "chopper_system" and "moderator" entries must be present +# At a minimum, the "chopper_system" and "moderator" entries must be present chopper_system: name: LET chopper system @@ -77,7 +77,7 @@ chopper_system: ei_limits: [0, 30] # Limits on ei for multirep calculations (reps outside range ignored) flux_ref_slot: 20 # Reference slot width (mm) for flux transmission calculation (disk choppers only) flux_ref_freq: 150 # Reference final chopper freq (Hz) for flux transmission calc (disk choppers only) - # Can define variants which overide one of the above parameters + # Can define variants which override one of the above parameters variants: # On LET the final chopper has 3 sets of slots with different widths High Flux: # This is the default mode (uses the widest 31mm slot). default: True # If this key is omitted, the variant without any option is used as default @@ -116,7 +116,7 @@ moderator: theta: 32.0 # Angle beamline makes with moderator face (degrees) source_rep: 10 # Frequency of source (Hz) emission_time: 3500 # Time width of source pulse in microseconds (only used to determine spurious reps in multi-rep mode) - measured_width: # Table of measured moderator time widths in microseconds. If present will overide imod and mod_pars + measured_width: # Table of measured moderator time widths in microseconds. If present will override imod and mod_pars isSigma: False # Indicates measurements are FWHM wavelength: [3.8063, 2.1961, 6.2121, 5.3820, 1.4371, 1.7010, 2.6920, 1.9013] width: [90.4, 40.8, 154.4, 131.2, 22.4, 25.6, 52.4, 32.4] diff --git a/scripts/PyChop/maps.yaml b/scripts/PyChop/maps.yaml index 8890d408445..90a5bebdede 100644 --- a/scripts/PyChop/maps.yaml +++ b/scripts/PyChop/maps.yaml @@ -13,9 +13,9 @@ chopper_system: distance: 8.831 # Distance from moderator to this chopper in metres slot_width: 68 # Slot width in mm guide_width: 50 # Width of guide after chopper in mm - nslot: 4 # Number of slots. If slot_ang_pos is specified can ommit this entry + nslot: 4 # Number of slots. If slot_ang_pos is specified can omit this entry # Next line has the angular position of the slots in degrees - # Must be monotonically increasing. Can omit if nslot is specifed, + # Must be monotonically increasing. Can omit if nslot is specified, # in which case it will be assumed that the slits are equally spaced. slot_ang_pos: [-180., -39.1, 0., 39.1] radius: 375 # Disk radius @@ -93,11 +93,11 @@ moderator: # of the flux distribution for ISIS TS1 moderators. If measured_flux is defined below, name can be anything imod: 2 # Moderator time profile type: 0==chi^2, 1==Ikeda-Carpenter, 2==modified chi^2 mod_pars: [38.6, 0.5226] # Parameters for time profile - mod_scale_fn: soft_hat # Function to modify the parameters depending on energy (ommit or leave blank for no modification) + mod_scale_fn: soft_hat # Function to modify the parameters depending on energy (omit or leave blank for no modification) mod_scale_par: [1.0, 0.0, 0.0, 150.0, 0.01, 70.0] theta: 32.0 # Angle beamline makes with moderator face (degrees) source_rep: 50 # Frequency of source (Hz) - measured_width: # Table of measured moderator time widths in microseconds. If present will overide imod and mod_pars + measured_width: # Table of measured moderator time widths in microseconds. If present will override imod and mod_pars isSigma: False # Indicates measurements are FWHM wavelength: [3.81593, 5.39537, 2.2052, 2.70006, 3.25499, 1.70813, 3.11649, 1.44378, 2.41516, 1.91018, 2.47745, 1.27303, 2.07872, 1.05928, 1.55951] width: [54, 62, 40, 44, 48, 35, 47, 30, 41, 37, 40, 25, 38, 20, 31] diff --git a/scripts/PyChop/mari.yaml b/scripts/PyChop/mari.yaml index ed1f0922809..9cf77825f80 100644 --- a/scripts/PyChop/mari.yaml +++ b/scripts/PyChop/mari.yaml @@ -13,9 +13,9 @@ chopper_system: distance: 7.85 # Distance from moderator to this chopper in metres slot_width: 65 # Slot width in mm guide_width: 60 # Width of guide after chopper in mm - nslot: 4 # Number of slots. If slot_ang_pos is specified can ommit this entry + nslot: 4 # Number of slots. If slot_ang_pos is specified can omit this entry # Next line has the angular position of the slots in degrees - # Must be monotonically increasing. Can omit if nslot is specifed, + # Must be monotonically increasing. Can omit if nslot is specified, # in which case it will be assumed that the slits are equally spaced. slot_ang_pos: [0, 36.48, 72.76, 145.52] radius: 367 # Disk radius @@ -121,7 +121,7 @@ moderator: mod_pars: [38.6, 0.5226] # Parameters for time profile theta: 13.0 # Angle beamline makes with moderator face (degrees) source_rep: 50 # Frequency of source (Hz) - measured_width: # Table of measured moderator time widths in microseconds. If present will overide imod and mod_pars + measured_width: # Table of measured moderator time widths in microseconds. If present will override imod and mod_pars isSigma: False # Indicates measurements are FWHM wavelength: [4.0240, 5.6898, 2.3250, 2.8480, 1.5224, 3.4331, 1.8009, 1.1167] width: [53.2, 62, 39.2, 44.8, 18.8, 48.8, 27.2, 12.4] diff --git a/scripts/PyChop/merlin.yaml b/scripts/PyChop/merlin.yaml index 4997b127cd4..1d292a45311 100644 --- a/scripts/PyChop/merlin.yaml +++ b/scripts/PyChop/merlin.yaml @@ -13,9 +13,9 @@ chopper_system: distance: 9.3 # Distance from moderator to this chopper in metres slot_width: 950 # Slot width in mm guide_width: 64 # Width of guide after chopper in mm - nslot: 1 # Number of slots. If slot_ang_pos is specified can ommit this entry + nslot: 1 # Number of slots. If slot_ang_pos is specified can omit this entry # Next line has the angular position of the slots in degrees - # Must be monotonically increasing. Can omit if nslot is specifed, + # Must be monotonically increasing. Can omit if nslot is specified, # in which case it will be assumed that the slits are equally spaced. radius: 250 # Disk radius isDouble: False # Is this a double disk system? @@ -84,7 +84,7 @@ moderator: mod_pars: [80.0, 0.5226] # Parameters for time profile theta: 26.7 # Angle beamline makes with moderator face (degrees) source_rep: 50 # Frequency of source (Hz) - measured_width: # Table of measured moderator time widths in microseconds. If present will overide imod and mod_pars + measured_width: # Table of measured moderator time widths in microseconds. If present will override imod and mod_pars isSigma: False # Indicates measurements are FWHM wavelength: [3.81238, 5.38791, 2.20214, 2.69636, 3.25068, 1.70664, 1.9078, 1.4425, 3.11379, 2.41294, 2.47528, 1.27219, 2.07682, 1.05882, 1.55818] width: [49, 56, 34, 37, 42, 29, 30, 25, 40, 34, 35, 21, 31, 18, 26] diff --git a/scripts/QECoverage.py b/scripts/QECoverage.py index db18f5425f0..94cb36fd909 100644 --- a/scripts/QECoverage.py +++ b/scripts/QECoverage.py @@ -100,7 +100,7 @@ class QECoverageGUI(QtGui.QWidget): self.direct_emin_label = QtGui.QLabel("Emin", self.direct_emin) self.direct_emin_grid.addWidget(self.direct_emin_label) self.direct_emin_input = QtGui.QLineEdit("-10", self.direct_emin) - self.direct_emin_input.setToolTip("Mininum energy transfer to plot down to.") + self.direct_emin_input.setToolTip("Minimum energy transfer to plot down to.") self.direct_emin_grid.addWidget(self.direct_emin_input) self.direct_grid.addWidget(self.direct_emin) self.direct_plotbtn = QtGui.QPushButton("Plot Q-E", self.tab_direct) diff --git a/scripts/Reflectometry/isis_reflectometry/combineMulti.py b/scripts/Reflectometry/isis_reflectometry/combineMulti.py index d305edbc037..5d8cf62531e 100644 --- a/scripts/Reflectometry/isis_reflectometry/combineMulti.py +++ b/scripts/Reflectometry/isis_reflectometry/combineMulti.py @@ -84,7 +84,7 @@ def stitch2(ws1, ws2, output_ws_name, begoverlap, endoverlap, Qmin, Qmax, binnin else: manual_scalefactor = False scalefactor = 1.0 - # Interally use the Stitch1D algorithm. + # Internally use the Stitch1D algorithm. outputs = Stitch1D(LHSWorkspace=ws1, RHSWorkspace=ws2, OutputWorkspace=output_ws_name, StartOverlap=begoverlap, EndOverlap=endoverlap, UseManualScaleFactor=manual_scalefactor, @@ -116,7 +116,7 @@ def combine2(wksp1, wksp2, outputwksp, begoverlap, endoverlap, Qmin, Qmax, binni else: manual_scalefactor = False scalefactor = 1.0 - # Interally use the Stitch1D algorithm. + # Internally use the Stitch1D algorithm. outputs = Stitch1D(LHSWorkspace=mtd[wksp1], RHSWorkspace=mtd[wksp2], OutputWorkspace=outputwksp, StartOverlap=begoverlap, EndOverlap=endoverlap, UseManualScaleFactor=manual_scalefactor, diff --git a/scripts/Reflectometry/isis_reflectometry/quick.py b/scripts/Reflectometry/isis_reflectometry/quick.py index 1d02a5df946..942269f5ee9 100644 --- a/scripts/Reflectometry/isis_reflectometry/quick.py +++ b/scripts/Reflectometry/isis_reflectometry/quick.py @@ -1,6 +1,6 @@ # pylint: disable=invalid-name, too-many-branches, too-few-public-methods, too-many-arguments, too-many-locals ''' SVN Info: The variables below will only get subsituted at svn checkout if - the repository is configured for variable subsitution. + the repository is configured for variable substitution. $Id$ $HeadURL$ @@ -147,8 +147,8 @@ def quick_explicit(run, i0_monitor_index, lambda_min, lambda_max, background_min RunNumber = groupGet(_sample_ws.name(), 'samp', 'run_number') if not pointdet: - # Proccess Multi-Detector; assume MD goes to the end: - # if roi or db are given in the function then sum over the apropriate channels + # Process Multi-Detector; assume MD goes to the end: + # if roi or db are given in the function then sum over the appropriate channels print("This is a multidetector run.") _I0M = RebinToWorkspace(WorkspaceToRebin=_monitor_ws, WorkspaceToMatch=_detector_ws) diff --git a/scripts/SANS/DarkRunCorrection.py b/scripts/SANS/DarkRunCorrection.py index 6d32e9488d4..de6234631c3 100644 --- a/scripts/SANS/DarkRunCorrection.py +++ b/scripts/SANS/DarkRunCorrection.py @@ -177,7 +177,7 @@ class DarkRunNormalizationExtractor(object): @param prop: the property from which we extract the frames @returns the number of good frames ''' - # Since we are dealing with a cummulative sample log, we can extract + # Since we are dealing with a cumulative sample log, we can extract # the total number of good frames by looking at the last frame frames = prop.value return frames[-1] diff --git a/scripts/SANS/ISISCommandInterface.py b/scripts/SANS/ISISCommandInterface.py index 088de7b71f4..bfebe9e5580 100644 --- a/scripts/SANS/ISISCommandInterface.py +++ b/scripts/SANS/ISISCommandInterface.py @@ -499,7 +499,7 @@ def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_su # This section provides a the REAR -- FRONT fitting and a stitched workspace. # If merge_flag is selected we use SANSStitch and get the fitting for free - # If fitRequired is selected, then we explicity call the SANSFitScale algorithm + # If fitRequired is selected, then we explicitly call the SANSFitScale algorithm if merge_flag: if ReductionSingleton().getNumSlices() > 1: slices = [] @@ -517,7 +517,7 @@ def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_su retWSname = retWSname_merged elif fitRequired: - # Get fit paramters + # Get fit parameters scale_factor, shift_factor, fit_mode = su.extract_fit_parameters(rAnds) # Since only the fit is required we use only the SANSFitScale algorithm @@ -597,7 +597,7 @@ def _merge_workspaces(retWSname_front, retWSname_rear, rAnds): # The CAN was not specified consider_can = False - # Get fit paramters + # Get fit parameters scale_factor, shift_factor, fit_mode, fit_min, fit_max = su.extract_fit_parameters(rAnds) merge_range = ReductionSingleton().instrument.getDetector('FRONT').mergeRange @@ -643,7 +643,7 @@ def _merge_workspaces(retWSname_front, retWSname_rear, rAnds): # Get the merged workspace mergedQ = alg_stitch.getProperty("OutputWorkspace").value - # Add the ouput to the Analysis Data Service + # Add the output to the Analysis Data Service AnalysisDataService.addOrReplace(retWSname_merged, mergedQ) # save the properties Transmission and TransmissionCan inside the merged workspace @@ -1349,7 +1349,7 @@ def GetTransmissionMonitorSpectrum(): """ Gets the transmission monitor spectrum. In the case of 4 or 17788 (for LOQ) the result is 4. - @return: tranmission monitor spectrum + @return: transmission monitor spectrum """ transmission_monitor = ReductionSingleton().transmission_calculator.trans_mon if ReductionSingleton().instrument._NAME == "LOQ" and transmission_monitor == 17788: @@ -1382,7 +1382,7 @@ def GetTransmissionMonitorSpectrumShift(): """ Gets the addditional shift for the transmission monitor spectrum. This currently only exists for SANS2D - @return: tranmission monitor spectrum + @return: transmission monitor spectrum """ inst = ReductionSingleton().get_instrument() if inst.name() != "SANS2D" and inst.name() != "SANS2DTUBES": @@ -1409,7 +1409,7 @@ def SetTransmissionMonitorSpectrumShift(trans_mon_shift): def GetTransmissionRadiusInMM(): """ Gets the radius for usage with beam stop as transmission monitor in mm - @return: tranmission radius in mm + @return: transmission radius in mm """ radius = ReductionSingleton().transmission_calculator.radius if radius is not None: @@ -1453,7 +1453,7 @@ def SetTransmissionROI(trans_roi_files): def GetTransmissionMask(): """ - Gets the list of transmission maks file names + Gets the list of transmission mask file names @return: list of transmission mask file names or None """ trans_mask_files = ReductionSingleton().transmission_calculator.mask_files @@ -1486,7 +1486,7 @@ def AddRuns(runs, instrument='sans2d', saveAsEvent=False, binning="Monitors", is string list with the same format that is used for the Rebin algorithm. This property is ignored when saving as event data. @param isOverlay: sets if the the overlay mechanism should be used when the saveAsEvent flag is set - @param time_shifts: provides additional time shifts if the isOverlay flag is specified. The time shifts are specifed + @param time_shifts: provides additional time shifts if the isOverlay flag is specified. The time shifts are specified in a string list. Either time_shifts is not used or a list with times in secomds. Note that there has to be one entry fewer than the number of workspaces to add. @param defType: the file type @@ -1538,7 +1538,7 @@ def set_q_resolution_moderator(file_name): "which exists in the search directories. See details: %s" % str(details)) -# -- Use q resoltion +# -- Use q resolution def get_q_resultution_use(): ''' Gets if the q resolution option is being used @@ -1559,7 +1559,7 @@ def set_q_resolution_use(use): elif not use: ReductionSingleton().to_Q.set_use_q_resolution(False) else: - sanslog.warning('Warning: Could could not set useage of QResolution') + sanslog.warning('Warning: Could could not set usage of QResolution') # -- Collimation length @@ -1738,7 +1738,7 @@ def reset_q_resolution_settings(): def set_q_resolution_float(func, arg, msg): ''' Set a q resolution value - @param func: the speficied function to run + @param func: the specified function to run @param arg: the argument @param mgs: error message ''' @@ -1755,7 +1755,7 @@ def set_q_resolution_float(func, arg, msg): def get_q_resolution_float(func, msg): ''' Gets a q resolution value and checks if it has been set. - @param func: the speficied function to run + @param func: the specified function to run @param mgs: error message @return the correct value ''' diff --git a/scripts/SANS/SANSBatchMode.py b/scripts/SANS/SANSBatchMode.py index 046a27c33be..f060f478afb 100644 --- a/scripts/SANS/SANSBatchMode.py +++ b/scripts/SANS/SANSBatchMode.py @@ -201,7 +201,7 @@ def BatchReduce(filename, format, plotresults=False, saveAlgs={'SaveRKH':'txt'}, runinfo = [] for line in file_handle: # See how many pieces of information have been provided; - # brackets delineate the field seperator (nothing for space-delimited, ',' for comma-seperated) + # brackets delineate the field separator (nothing for space-delimited, ',' for comma-seperated) parts = line.rstrip().split(',') if addRunToStore(parts, runinfo) > 0: issueWarning('Incorrect structure detected in input file "' + filename + '" at line \n"' + line + '"\nEntry skipped\n') diff --git a/scripts/SANS/SANSUserFileParser.py b/scripts/SANS/SANSUserFileParser.py index 480c64d3d43..4a810e04543 100644 --- a/scripts/SANS/SANSUserFileParser.py +++ b/scripts/SANS/SANSUserFileParser.py @@ -53,7 +53,7 @@ class BackCommandParser(object): def _evaluate_mean(self, argument): ''' - Evalutes if the argument is either MEAN, TOF or something else. + Evaluates if the argument is either MEAN, TOF or something else. @param argument: string to investigate @raise RuntimeError: If the argument cannot be parsed correctly ''' @@ -68,7 +68,7 @@ class BackCommandParser(object): def _evaluate_uniform(self, argument): ''' - Evalutes if the argument is either TIME, UAMP or something else. + Evaluates if the argument is either TIME, UAMP or something else. @param argument: string to investigate @raise RuntimeError: If the argument cannot be parsed correctly ''' @@ -83,7 +83,7 @@ class BackCommandParser(object): def _evaluate_run(self, argument): ''' - Evalutes if the argument is RUN= + Evaluates if the argument is RUN= @param argument: string to investigate @raise RuntimeError: If the argument cannot be parsed correctly ''' @@ -98,7 +98,7 @@ class BackCommandParser(object): def _evaluate_mon(self, argument): ''' - Evaluates which detector to use. At this point the validty of this has already been checkd, so + Evaluates which detector to use. At this point the validty of this has already been checked, so we can just take it as is. @param argument: string to investigate @raise RuntimeError: If the argument cannot be parsed correctly diff --git a/scripts/SANS/SANSUtility.py b/scripts/SANS/SANSUtility.py index cae2af73310..3195b3a6481 100644 --- a/scripts/SANS/SANSUtility.py +++ b/scripts/SANS/SANSUtility.py @@ -968,7 +968,7 @@ class AddOperation(object): def __init__(self,isOverlay, time_shifts): """ The AddOperation requires to know if the workspaces are to - be plainly added or to be overlayed. Additional time shifts can be + be plainly added or to be overlaid. Additional time shifts can be specified @param isOverlay :: true if the operation is an overlay operation @param time_shifts :: a string with comma-separted time shift values @@ -1032,7 +1032,7 @@ class PlusWorkspaces(object): rhs_ws = self._get_workspace(RHS_workspace) # Apply shift to RHS sample logs where necessary. This is a hack because Plus cannot handle - # cummulative time series correctly at this point + # cumulative time series correctly at this point cummulative_correction = CummulativeTimeSeriesPropertyAdder() cummulative_correction. extract_sample_logs_from_workspace(lhs_ws, rhs_ws) Plus(LHSWorkspace = LHS_workspace, RHSWorkspace = RHS_workspace, OutputWorkspace = output_workspace) @@ -1049,7 +1049,7 @@ class PlusWorkspaces(object): class OverlayWorkspaces(object): """ Overlays (in time) a workspace on top of another workspace. The two - workspaces overlayed such that the first time entry of their proton_charge entry matches. + workspaces overlaid such that the first time entry of their proton_charge entry matches. This overlap can be shifted by the specified time_shift in seconds """ @@ -1070,11 +1070,11 @@ class OverlayWorkspaces(object): total_time_shift = time_difference + time_shift # Apply shift to RHS sample logs where necessary. This is a hack because Plus cannot handle - # cummulative time series correctly at this point + # cumulative time series correctly at this point cummulative_correction = CummulativeTimeSeriesPropertyAdder() cummulative_correction. extract_sample_logs_from_workspace(lhs_ws, rhs_ws) - # Create a temporary workspace with shifted time values from RHS, if the shift is necesary + # Create a temporary workspace with shifted time values from RHS, if the shift is necessary temp = rhs_ws temp_ws_name = 'shifted' if total_time_shift != 0.0: @@ -1185,7 +1185,7 @@ def transfer_special_sample_logs(from_ws, to_ws): class CummulativeTimeSeriesPropertyAdder(object): ''' Apply shift to RHS sample logs where necessary. This is a hack because Plus cannot handle - cummulative time series correctly at this point. + cumulative time series correctly at this point. ''' def __init__(self, total_time_shift_seconds = 0): @@ -1215,7 +1215,7 @@ class CummulativeTimeSeriesPropertyAdder(object): ''' run_lhs = lhs.getRun() run_rhs = rhs.getRun() - # Get the cummulative time s + # Get the cumulative time s for element in self._time_series: if (run_lhs.hasProperty(element) and run_rhs.hasProperty(element)): @@ -1268,7 +1268,7 @@ class CummulativeTimeSeriesPropertyAdder(object): def _update_single_valued_entries(self, workspace): ''' We need to update single-valued entries which are based on the - cummulative time series + cumulative time series @param workspace: the workspace which requires the changes ''' run = workspace.getRun() @@ -1349,7 +1349,7 @@ class CummulativeTimeSeriesPropertyAdder(object): def _get_raw_values(self, values): ''' - We extract the original data from the cummulative + We extract the original data from the cumulative series. ''' raw_values = [] @@ -1881,7 +1881,7 @@ def is_valid_user_file_extension(user_file): def createUnmanagedAlgorithm(name, **kwargs): ''' This creates an unmanged child algorithm with the - provided proeprties set. The returned algorithm has + provided properties set. The returned algorithm has not been executed yet. ''' alg = AlgorithmManager.createUnmanaged(name) @@ -1924,7 +1924,7 @@ def check_has_bench_rot(workspace, log_dict=None): run = workspace.run() if not run.hasProperty("Bench_Rot"): raise RuntimeError("LARMOR Instrument: Bench_Rot does not seem to be available on {0}. There might be " - "an issue with your data aquisition. Make sure that the sample_log entry " + "an issue with your data acquisition. Make sure that the sample_log entry " "Bench_Rot is available.".format(workspace.name())) @@ -1980,7 +1980,7 @@ def get_correct_combinDet_setting(instrument_name, detector_selection): """ We want to get the correct combinDet variable for batch reductions from a new detector selection. - @param instrument_name: the name of the intrument + @param instrument_name: the name of the instrument @param detector_selection: a detector selection comes directly from the reducer @return: a combinedet option """ diff --git a/scripts/SANS/SANSadd2.py b/scripts/SANS/SANSadd2.py index 5203b097814..a82dcc64c15 100644 --- a/scripts/SANS/SANSadd2.py +++ b/scripts/SANS/SANSadd2.py @@ -207,7 +207,7 @@ def handle_saving_event_workspace_when_saving_as_histogram(binning, is_first_dat workspace_type = get_workspace_type(filename) if workspace_type is WorkspaceType.MultiperiodEvent: # If we are dealing with multi-period event workspaces then there is no way of getting any other - # sample log inforamtion hence we use make a copy of the monitor workspace and use that instead + # sample log information hence we use make a copy of the monitor workspace and use that instead # of the reloading the first file again CloneWorkspace(InputWorkspace=ADD_FILES_SUM_TEMPORARY_MONITORS, OutputWorkspace=ADD_FILES_SUM_TEMPORARY) else: diff --git a/scripts/SANS/centre_finder.py b/scripts/SANS/centre_finder.py index 770276ef046..397d20be9b9 100644 --- a/scripts/SANS/centre_finder.py +++ b/scripts/SANS/centre_finder.py @@ -93,7 +93,7 @@ class CentreFinder(object): self.coord1_scale_factor = setup.instrument.beam_centre_scale_factor1 self.coord2_scale_factor = setup.instrument.beam_centre_scale_factor2 - # We are looking only at the differnce between the old position and the trial. + # We are looking only at the difference between the old position and the trial. self.move(setup, trial[0]-self._last_pos[0], trial[1]-self._last_pos[1]) #phi masking will remove areas of the detector that we need @@ -364,7 +364,7 @@ class CentrePositioner(object): ''' return self.position_provider.provide_sign_policy() -# Thes classes make sure that only the relevant directions are updated +# These classes make sure that only the relevant directions are updated # They are not instrument dependent, they should only dependt on the user's choice. @@ -758,7 +758,7 @@ class PositionProviderAngleY(PositionProvider): ''' Get the sign policy for the angle, y translations. Displacing the beam by 5mm is equivalent to displacing the instrument by -5mm. The angle displacement in - LARMOR does the sign switch already. Hence we have a positve sign policy for + LARMOR does the sign switch already. Hence we have a positive sign policy for the angle direction ''' return self.sign_policy_angle, self.sign_policy_y diff --git a/scripts/SANS/isis_instrument.py b/scripts/SANS/isis_instrument.py index a83d4d46834..6163202b499 100644 --- a/scripts/SANS/isis_instrument.py +++ b/scripts/SANS/isis_instrument.py @@ -408,7 +408,7 @@ class DetectorBank(object): """ Sets to relationship between the detectors and the spectra numbers. The relationship is given by an orientation string and this function throws if the string is not recognised - @param orien: the orienation string must be a string contained in the dictionary _ORIENTED + @param orien: the orientation string must be a string contained in the dictionary _ORIENTED """ self._ORIENTED[orien] self._orientation = orien @@ -564,7 +564,7 @@ class ISISInstrument(BaseInstrument): def suggest_incident_mntr(self, spectrum_number): """ - remove this function and the data memember it uses + remove this function and the data member it uses """ if not self._del_incidient_set: self.set_incident_mon(spectrum_number) @@ -788,7 +788,7 @@ class ISISInstrument(BaseInstrument): It configures the instrument for the specific run of the workspace for handle historical changes in the instrument. - It centralizes the detector bank to teh beamcentre (tuple of two values) + It centralizes the detector bank to the beamcentre (tuple of two values) """ ws_ref = mtd[str(ws_name)] try: @@ -895,8 +895,8 @@ class ISISInstrument(BaseInstrument): def get_m4_monitor_det_ID(self): """ - Gets the detecor ID assoicated with Monitor 4 - @returns: teh det ID of Monitor 4 + Gets the detecor ID associated with Monitor 4 + @returns: the det ID of Monitor 4 """ raise RuntimeError("Monitor 4 does not seem to be implemented.") @@ -943,7 +943,7 @@ class LOQ(ISISInstrument): It configures the instrument for the specific run of the workspace for handle historical changes in the instrument. - It centralizes the detector bank to teh beamcentre (tuple of two values) + It centralizes the detector bank to the beamcentre (tuple of two values) """ ws_ref = mtd[str(ws_name)] try: @@ -1139,7 +1139,7 @@ class SANS2D(ISISInstrument): def getDetValues(self, ws_name): """ - Retrive the values of Front_Det_Z, Front_Det_X, Front_Det_Rot, Rear_Det_Z and Rear_Det_X from + Retrieve the values of Front_Det_Z, Front_Det_X, Front_Det_Rot, Rear_Det_Z and Rear_Det_X from the workspace. If it does not find the value at the run info, it takes as default value the self.FRONT_DET_Z, self... which are extracted from the sample workspace at apply_detector_log. @@ -1520,7 +1520,7 @@ class LARMOR(ISISInstrument): def getDetValues(self, ws_name): """ - Retrive the values of Bench_Rot from the workspace. If it does not find the value at the run info, + Retrieve the values of Bench_Rot from the workspace. If it does not find the value at the run info, it takes as default value the self.BENCH_ROT, which are extracted from the sample workspace at apply_detector_log. This is done to allow the function move_components to use the correct values and not to use @@ -1729,13 +1729,13 @@ class LARMOR(ISISInstrument): @param x_beam: either a shift in mm or a angle in degree @param x_scale_factor: ''' - # in order to avoid rewriting old mask files from initial commisioning during 2014. + # in order to avoid rewriting old mask files from initial commissioning during 2014. ws_ref = mtd[workspace] # The angle value # Note that the x position gets converted from mm to m when read from the user file so we need to reverse this if X is now an angle if not LARMOR.is_run_new_style_run(ws_ref): - # Initial commisioning before run 2217 did not pay much attention to making sure the bench_rot value was meaningful + # Initial commissioning before run 2217 did not pay much attention to making sure the bench_rot value was meaningful xshift = -x_beam sanslog.notice("Setup move " + str(xshift * x_scale_factor) + " " + str(0.0) + " " + str(0.0)) MoveInstrumentComponent(workspace, ComponentName=component_name, X=xshift, Y=0.0, Z=0.0) @@ -1766,7 +1766,7 @@ class LARMOR(ISISInstrument): def cur_detector_position(self, ws_name): """Return the position of the center of the detector bank""" - # Unforunately getting the angle of the bench does not work so we have to get bench and detector + # Unfortunately getting the angle of the bench does not work so we have to get bench and detector # logger.warning("Entering cur_detector_position") ws = mtd[ws_name] @@ -1801,7 +1801,7 @@ class LARMOR(ISISInstrument): """ # logger.warning("Entering on_load_sample") ws_ref = mtd[str(ws_name)] - # in order to avoid problems with files from initial commisioning during 2014. + # in order to avoid problems with files from initial commissioning during 2014. # these didn't have the required log entries for the detector position if LARMOR.is_run_new_style_run(ws_ref): @@ -1815,7 +1815,7 @@ class LARMOR(ISISInstrument): run = ws_ref.run() if not run.hasProperty("Bench_Rot"): additional_message = ("The Bench_Rot entry seems to be missing. There might be " - "an issue with your data aquisition. Make sure that the sample_log entry " + "an issue with your data acquisition. Make sure that the sample_log entry " "Bench_Rot is available.") else: additional_message = "" @@ -1838,7 +1838,7 @@ class LARMOR(ISISInstrument): ''' Checks if the run assiated with the workspace is pre or post 2217 Original comment: - In order to avoid problems with files from initial commisioning during 2014. + In order to avoid problems with files from initial commissioning during 2014. these didn't have the required log entries for the detector position @param workspace_ref:: A handle to the workspace ''' diff --git a/scripts/SANS/isis_reducer.py b/scripts/SANS/isis_reducer.py index 5721f2a0d77..5463a10e01a 100644 --- a/scripts/SANS/isis_reducer.py +++ b/scripts/SANS/isis_reducer.py @@ -382,7 +382,7 @@ class ISISReducer(Reducer): self.settings = get_settings_object() # Dark Run Subtraction handler. This is not a step but a utility class - # which gets used during cropping and Tranmission calculation + # which gets used during cropping and Transmission calculation self.dark_run_subtraction = isis_reduction_steps.DarkRunSubtraction() # Unwrap monitors @@ -729,7 +729,7 @@ class ISISReducer(Reducer): # set_beam_finder: override to accept the front detector def set_beam_finder(self, finder, det_bank='rear'): """ - Extends teh SANS_reducer in order to support 2 bank detectors + Extends the SANS_reducer in order to support 2 bank detectors Set the ReductionStep object that finds the beam center @param finder: BaseBeamFinder object @param det_bank: two valid options: 'rear', 'front' @@ -947,7 +947,7 @@ class ISISReducer(Reducer): def get_dark_run_setting(self, is_time, is_mon): ''' - Gets one of the four dark run setttings + Gets one of the four dark run settings @param is_time: is it time_based or not @param is_mon: monitors or not @returns the requested setting diff --git a/scripts/SANS/isis_reduction_steps.py b/scripts/SANS/isis_reduction_steps.py index bbf31b2df12..c804083f8cc 100644 --- a/scripts/SANS/isis_reduction_steps.py +++ b/scripts/SANS/isis_reduction_steps.py @@ -331,7 +331,7 @@ class LoadRun(object): try: if self._is_trans and reducer.instrument.name() != 'LOQ': - # Unfortunatelly, LOQ in transmission acquire 3 monitors the 3 monitor usually + # Unfortunately, LOQ in transmission acquire 3 monitors the 3 monitor usually # is the first spectrum for detector. This causes the following method to fail # when it tries to load only monitors. Hence, we are forced to skip this method # for LOQ. ticket #8559 @@ -632,7 +632,7 @@ class Mask_ISIS(ReductionStep): def _infinite_plane(self, id, plane_pt, normal_pt, complement=False): """ - Generates xml code for an infinte plane + Generates xml code for an infinite plane @param id: a string to refer to the shape by @param plane_pt: a point in the plane @param normal_pt: the direction of a normal to the plane @@ -649,7 +649,7 @@ class Mask_ISIS(ReductionStep): def _infinite_cylinder(self, centre, radius, axis, id='shape'): """ Generates xml code for an infintely long cylinder - @param centre: a tupple for a point on the axis + @param centre: a tuple for a point on the axis @param radius: cylinder radius @param axis: cylinder orientation @param id: a string to refer to the shape by @@ -663,7 +663,7 @@ class Mask_ISIS(ReductionStep): def _finite_cylinder(self, centre, radius, height, axis, id='shape'): """ Generates xml code for an infintely long cylinder - @param centre: a tupple for a point on the axis + @param centre: a tuple for a point on the axis @param radius: cylinder radius @param height: cylinder height @param axis: cylinder orientation @@ -1179,7 +1179,7 @@ class DarkRunSubtraction(object): ''' # The named tuple contains the information for a dark run subtraction for a single run number ( of # a dark run file) - # The relevant inforamtion is the run number, if we use time or uamp, if we use mean or tof, if we + # The relevant information is the run number, if we use time or uamp, if we use mean or tof, if we # apply this to all detectors, if we apply this to monitors and if so to which monitors DarkRunSubtractionSettings = namedtuple("DarkRunSettings", "run_number time mean detector mon mon_numbers") @@ -3262,7 +3262,7 @@ class UserFile(ReductionStep): raise RuntimeError("%s was specified in the MASK file (%s) but the file cannot be found." % ( line.rsplit()[0], file_handle.name)) - # Check if one of the efficency files hasn't been set and assume the other is to be used + # Check if one of the efficiency files hasn't been set and assume the other is to be used reducer.instrument.copy_correction_files() # Run a consistency check @@ -3347,7 +3347,7 @@ class UserFile(ReductionStep): self._readFrontRescaleShiftSetup(det_specif, reducer) elif any(it == det_specif.strip() for it in ['FRONT', 'REAR', 'BOTH', 'MERGE', 'MERGED', 'MAIN', 'HAB']): # for /DET/FRONT, /DET/REAR, /DET/BOTH, /DET/MERGE and /DET/MERGED commands - # we also accomodate DET/MAIN and DET/HAB here which are specificially for LOQ + # we also accommodate DET/MAIN and DET/HAB here which are specifically for LOQ det_specif = det_specif.strip() if det_specif == 'MERGE': det_specif = 'MERGED' @@ -3546,7 +3546,7 @@ class UserFile(ReductionStep): def _read_mon_line(self, details, reducer): # noqa: C901 - # MON/LENTH, MON/SPECTRUM and MON/TRANS all accept the INTERPOLATE option + # MON/LENGTH, MON/SPECTRUM and MON/TRANS all accept the INTERPOLATE option interpolate = False interPlace = details.upper().find('/INTERPOLATE') if interPlace != -1: @@ -3564,7 +3564,7 @@ class UserFile(ReductionStep): spectrum = int(options[1]) # reducer.instrument.monitor_zs[spectrum] = options[0] - # the settings here are overriden by MON/SPECTRUM + # the settings here are overridden by MON/SPECTRUM if not self._incid_monitor_lckd: reducer.set_monitor_spectrum( spectrum, interpolate, override=False) @@ -3997,7 +3997,7 @@ class UserFile(ReductionStep): reducer.inst.reset_TOFs() def _read_calibfile_line(self, arguments, reducer): - # remove the equals from the beggining and any space around. + # remove the equals from the beginning and any space around. parts = re.split(r"\s?=\s?", arguments) if len(parts) != 2: return "Invalid input for TUBECALIBFILE" + str(arguments) + ". Expected TUBECALIBFILE = file_path" @@ -4023,7 +4023,7 @@ class UserFile(ReductionStep): def _read_unwrap_monitors_line(self, arguments, reducer): """ Checks if the montiors should be unwrapped. The arguments can be either ON or OFF. We don't care here about - any preceeding slash + any preceding slash Args: arguments: the arguments string reducer: a handle to the reducer (is not used) diff --git a/scripts/SANS/reduction_settings.py b/scripts/SANS/reduction_settings.py index 185794615c7..c61f97cf123 100644 --- a/scripts/SANS/reduction_settings.py +++ b/scripts/SANS/reduction_settings.py @@ -73,7 +73,7 @@ REDUCTION_SETTINGS_OBJ_NAME = "ISISSANSReductionSettings" def get_settings_object(settings_prop_man_name=REDUCTION_SETTINGS_OBJ_NAME): """ Returns the PropertyManager object with the given name. This could be used - to store settings used by the reduction, or to seperately store some + to store settings used by the reduction, or to separately store some temporary or backup settings. If a PropertyManager object does not exist, then one is created. diff --git a/scripts/SANS/sans/algorithm_detail/batch_execution.py b/scripts/SANS/sans/algorithm_detail/batch_execution.py index e0953c3d811..92b1fa39fb8 100644 --- a/scripts/SANS/sans/algorithm_detail/batch_execution.py +++ b/scripts/SANS/sans/algorithm_detail/batch_execution.py @@ -433,7 +433,7 @@ def reduction_packages_require_splitting_for_event_slices(reduction_packages): The SANSSingleReduction algorithm can handle only a single time slice. For each time slice, we require an individual reduction. Hence we split the states up at this point. :param reduction_packages: a list of reduction packages. - :return: a list of reduction packages which has at leaset the same length as the input + :return: a list of reduction packages which has at least the same length as the input """ # Determine if the event slice sub-state object contains multiple event slice requests. This is given # by the number of elements in start_tof diff --git a/scripts/SANS/sans/algorithm_detail/mask_functions.py b/scripts/SANS/sans/algorithm_detail/mask_functions.py index 025c1280e4e..ee45b9abc2e 100644 --- a/scripts/SANS/sans/algorithm_detail/mask_functions.py +++ b/scripts/SANS/sans/algorithm_detail/mask_functions.py @@ -136,7 +136,7 @@ class SpectraBlock(object): """ Create a list of spectra for a rectangular block of size x_dim by y_dim - :param y_lower: the x coordiante of the starting point of the lower left corner + :param y_lower: the x coordinate of the starting point of the lower left corner :param x_lower: the y coordinate of the starting point of the lower left corner :param y_dim: the y dimension :param x_dim: the x dimension diff --git a/scripts/SANS/sans/algorithm_detail/mask_workspace.py b/scripts/SANS/sans/algorithm_detail/mask_workspace.py index 951a5bee34c..db9d499c7d3 100644 --- a/scripts/SANS/sans/algorithm_detail/mask_workspace.py +++ b/scripts/SANS/sans/algorithm_detail/mask_workspace.py @@ -305,7 +305,7 @@ def mask_beam_stop(mask_info, workspace, instrument, detector_names): :param mask_info: a SANSStateMask object. :param workspace: the workspace which is to be masked. - :param instrument: the instrument assoicated with the current workspace. + :param instrument: the instrument associated with the current workspace. :return: a masked workspace """ beam_stop_arm_width = mask_info.beam_stop_arm_width diff --git a/scripts/SANS/sans/algorithm_detail/single_execution.py b/scripts/SANS/sans/algorithm_detail/single_execution.py index f52f66cd30e..216616db165 100644 --- a/scripts/SANS/sans/algorithm_detail/single_execution.py +++ b/scripts/SANS/sans/algorithm_detail/single_execution.py @@ -13,7 +13,7 @@ import sys def run_core_reduction(reduction_alg, reduction_setting_bundle): """ - This function runs a core reduction. This is essentially half a reduction (either smaple or can). + This function runs a core reduction. This is essentially half a reduction (either sample or can). :param reduction_alg: a handle to the reduction algorithm. :param reduction_setting_bundle: a ReductionSettingBundle tuple diff --git a/scripts/SANS/sans/algorithm_detail/xml_shapes.py b/scripts/SANS/sans/algorithm_detail/xml_shapes.py index 14a900d3b93..d6e4fa88942 100644 --- a/scripts/SANS/sans/algorithm_detail/xml_shapes.py +++ b/scripts/SANS/sans/algorithm_detail/xml_shapes.py @@ -33,7 +33,7 @@ def infinite_plane(shape_id, plane_pt, normal_pt): def infinite_cylinder(centre, radius, axis, shape_id='shape'): """ Generates xml code for an infintely long cylinder - :param centre: a tupple for a point on the axis + :param centre: a tuple for a point on the axis :param radius: cylinder radius :param axis: cylinder orientation :param shape_id: a string to refer to the shape by diff --git a/scripts/SANS/sans/command_interface/ISISCommandInterface.py b/scripts/SANS/sans/command_interface/ISISCommandInterface.py index 8fe24e2ec42..5ceaf7848fa 100644 --- a/scripts/SANS/sans/command_interface/ISISCommandInterface.py +++ b/scripts/SANS/sans/command_interface/ISISCommandInterface.py @@ -591,7 +591,7 @@ def LimitsWav(lmin, lmax, step, bin_type): @param lmin: the lower wavelength bound. @param lmax: the upper wavelength bound. @param step: the wavelength step. - @param bin_type: teh bin type, ie linear or logarithmic. Accepted strings are "LINEAR" and "LOGARITHMIC" + @param bin_type: the bin type, ie linear or logarithmic. Accepted strings are "LINEAR" and "LOGARITHMIC" """ lmin = float(lmin) lmax = float(lmax) @@ -826,7 +826,7 @@ def BatchReduce(filename, format, plotresults=False, saveAlgs=None, verbose=Fals if centreit: raise RuntimeError("The beam centre finder is currently not supported.") if plotresults: - raise RuntimeError("Plotting the results is currenlty not supported.") + raise RuntimeError("Plotting the results is currently not supported.") # Set up the save algorithms save_algs = [] @@ -897,7 +897,7 @@ def BatchReduce(filename, format, plotresults=False, saveAlgs=None, verbose=Fals # Name of the output. We need to modify the name according to the setup of the old reduction mechanism output_name = parsed_batch_entry[BatchReductionEntry.Output] - # In addition to the output name the user can specify with combineDet an additional suffix (in addtion to the + # In addition to the output name the user can specify with combineDet an additional suffix (in addition to the # suffix that the user can set already -- was there previously, so we have to provide that) use_reduction_mode_as_suffix = combineDet is not None @@ -1017,7 +1017,7 @@ def FindBeamCentre(rlow, rupp, MaxIter=10, xstart=None, ystart=None, tolerance=1 Finds the beam centre position. @param rlow: Inner radius of quadrant @param rupp: Outer radius of quadrant - @param MaxIter: Maximun number of iterations + @param MaxIter: Maximum number of iterations @param xstart: starting x centre position, if not set is taken from user file @param ystart: starting y centre position, if not set is taken from user file @param tolerance: Sets the step size at which the search will stop @@ -1028,7 +1028,7 @@ def FindBeamCentre(rlow, rupp, MaxIter=10, xstart=None, ystart=None, tolerance=1 if not xstart: xstart = state.move.detectors['LAB'].sample_centre_pos1 elif config['default.instrument'] == 'LARMOR': - # This is to mantain compatibility with how this function worked in the old Interface so that legacy scripts still + # This is to maintain compatibility with how this function worked in the old Interface so that legacy scripts still # function xstart = xstart * 1000 if not ystart: @@ -1088,7 +1088,7 @@ def AddRuns(runs, instrument='sans2d', saveAsEvent=False, binning="Monitors", is string list with the same format that is used for the Rebin algorithm. This property is ignored when saving as event data. @param isOverlay: sets if the the overlay mechanism should be used when the saveAsEvent flag is set - @param time_shifts: provides additional time shifts if the isOverlay flag is specified. The time shifts are specifed + @param time_shifts: provides additional time shifts if the isOverlay flag is specified. The time shifts are specified in a string list. Either time_shifts is not used or a list with times in secomds. Note that there has to be one entry fewer than the number of workspaces to add. @param defType: the file type diff --git a/scripts/SANS/sans/command_interface/command_interface_state_director.py b/scripts/SANS/sans/command_interface/command_interface_state_director.py index 44062441b4a..47e4b77d250 100644 --- a/scripts/SANS/sans/command_interface/command_interface_state_director.py +++ b/scripts/SANS/sans/command_interface/command_interface_state_director.py @@ -190,7 +190,7 @@ class CommandInterfaceStateDirector(object): return # If there is more than one element, then we are only interested in the last element. The user could - # have overriden his wishes, e.g. + # have overridden his wishes, e.g. # ... # AssignSample('SANS2D1234') # ... @@ -434,7 +434,7 @@ class CommandInterfaceStateDirector(object): # Set the scale and the shift new_state_entries = {DetectorId.rescale: scale, DetectorId.shift: shift} - # Set the fit fot the scale + # Set the fit for the scale new_state_entries.update({DetectorId.rescale_fit: det_fit_range(start=q_min, stop=q_max, use_fit=fit_scale)}) # Set the fit for shift diff --git a/scripts/SANS/sans/common/constants.py b/scripts/SANS/sans/common/constants.py index c5584ac91d1..353b6d1c733 100644 --- a/scripts/SANS/sans/common/constants.py +++ b/scripts/SANS/sans/common/constants.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, print_function) # ---------------------------------------- -# Proeprty names for Algorithms +# Property names for Algorithms # --------------------------------------- MONITOR_SUFFIX = "_monitors" INPUT_WORKSPACE = "InputWorkspace" diff --git a/scripts/SANS/sans/common/file_information.py b/scripts/SANS/sans/common/file_information.py index e2589180314..3a99a179f2d 100644 --- a/scripts/SANS/sans/common/file_information.py +++ b/scripts/SANS/sans/common/file_information.py @@ -120,7 +120,7 @@ def get_extension_for_file_type(file_info): Get the extension for a specific file type. :param file_info: a SANSFileInformation object. - :return: the extension a stirng. This can be either nxs or raw. + :return: the extension a string. This can be either nxs or raw. """ if file_info.get_type() is FileType.ISISNexus or file_info.get_type() is FileType.ISISNexusAdded: extension = NXS_EXTENSION @@ -326,7 +326,7 @@ def get_number_of_periods_for_isis_nexus(file_name): def get_instrument_name_for_isis_nexus(file_name): """ - Instrument inforamtion is + Instrument information is file| |--mantid_workspace_1/raw_data_1| |--instrument| diff --git a/scripts/SANS/sans/common/general_functions.py b/scripts/SANS/sans/common/general_functions.py index c8d77e69a4b..59e1602ac20 100644 --- a/scripts/SANS/sans/common/general_functions.py +++ b/scripts/SANS/sans/common/general_functions.py @@ -223,7 +223,7 @@ def add_to_sample_log(workspace, log_name, log_value, log_type): """ Adds a sample log to the workspace - :param workspace: the workspace to whcih the sample log is added + :param workspace: the workspace to which the sample log is added :param log_name: the name of the log :param log_value: the value of the log in string format :param log_type: the log value type which can be String, Number, Number Series diff --git a/scripts/SANS/sans/gui_logic/models/state_gui_model.py b/scripts/SANS/sans/gui_logic/models/state_gui_model.py index 8515418e0d9..3d40e564e33 100644 --- a/scripts/SANS/sans/gui_logic/models/state_gui_model.py +++ b/scripts/SANS/sans/gui_logic/models/state_gui_model.py @@ -1,4 +1,4 @@ -""" The state gui model contains all the reduction information which is not explictily available in the data table. +""" The state gui model contains all the reduction information which is not explicitly available in the data table. This is one of the two models which is used for the data reduction. It contains generally all the settings which are not available in the model associated with the data table. @@ -128,7 +128,7 @@ class StateGuiModel(object): if SetId.centre in self._user_file_items: settings = self._user_file_items[SetId.centre] else: - # If the entry does not already exist, then add it. The -1. is an illegal input which should get overriden + # If the entry does not already exist, then add it. The -1. is an illegal input which should get overridden # and if not we want it to fail. settings = [position_entry(pos1=0.0, pos2=0.0, detector_type=DetectorType.LAB)] @@ -374,7 +374,7 @@ class StateGuiModel(object): if LimitsId.wavelength in self._user_file_items: settings = self._user_file_items[LimitsId.wavelength] else: - # If the entry does not already exist, then add it. The -1. is an illegal input which should get overriden + # If the entry does not already exist, then add it. The -1. is an illegal input which should get overridden # and if not we want it to fail. settings = [simple_range(start=-1., stop=-1., step=-1., step_type=RangeStepType.Lin)] diff --git a/scripts/SANS/sans/state/state.py b/scripts/SANS/sans/state/state.py index 3888fbb09e9..261c847f7e1 100644 --- a/scripts/SANS/sans/state/state.py +++ b/scripts/SANS/sans/state/state.py @@ -22,7 +22,7 @@ from sans.state.scale import StateScale from sans.state.convert_to_q import StateConvertToQ from sans.state.automatic_setters import (automatic_setters) -# Note that the compatibiliy state is not part of the new reduction chain, but allows us to accurately compare +# Note that the compatibility state is not part of the new reduction chain, but allows us to accurately compare # results obtained via the old and new reduction chain from sans.state.compatibility import (StateCompatibility, get_compatibility_builder) diff --git a/scripts/SANS/sans/state/state_base.py b/scripts/SANS/sans/state/state_base.py index 0153812d9f2..167ca43e2e7 100644 --- a/scripts/SANS/sans/state/state_base.py +++ b/scripts/SANS/sans/state/state_base.py @@ -508,8 +508,8 @@ def set_state_from_property_manager(instance, property_manager): """ Set the State object from the information stored on a property manager object. This is the deserialization step. - :param instance: the instance which is to be set with a values of the propery manager - :param property_manager: the property manager withe the stored setting + :param instance: the instance which is to be set with a values of the property manager + :param property_manager: the property manager with the stored setting """ def _set_element(inst, k_element, v_element): if k_element != STATE_NAME and k_element != STATE_MODULE: diff --git a/scripts/SANS/sans/test_helper/mock_objects.py b/scripts/SANS/sans/test_helper/mock_objects.py index c5a7d77091f..6c0ae523c1b 100644 --- a/scripts/SANS/sans/test_helper/mock_objects.py +++ b/scripts/SANS/sans/test_helper/mock_objects.py @@ -43,7 +43,7 @@ def get_cell_mock(row, column, convert_to=None, user_file_path = ""): _ = convert_to # noqa if row == 0: # For the first row we return the - # all of hte sample data + # all of the sample data if column == 0: return "SANS2D00022024" elif column == 2: diff --git a/scripts/SANS/sans/user_file/user_file_parser.py b/scripts/SANS/sans/user_file/user_file_parser.py index 3d3ea052318..35d11ca3ed4 100644 --- a/scripts/SANS/sans/user_file/user_file_parser.py +++ b/scripts/SANS/sans/user_file/user_file_parser.py @@ -143,7 +143,7 @@ class UserFileComponentParser(object): class BackParser(UserFileComponentParser): """ The BackParser handles the following structure - Command | Qualifer | Parameter + Command | Qualifier | Parameter BACK / MON/TIMES t1 t2 BACK / M m/TIMES t1 t2 BACK / M m t1 t2 @@ -784,7 +784,7 @@ class MaskParser(UserFileComponentParser): MASK Ssp1[>Ssp2] - MASK[/REAR/FRONT/HAB]/TIME t1 t2 or MASK[/REAR/FRONT/HAB]/T t1 t2 - if no detector is specfied, then mask + MASK[/REAR/FRONT/HAB]/TIME t1 t2 or MASK[/REAR/FRONT/HAB]/T t1 t2 - if no detector is specified, then mask is applied to both detectors. MASK/LINE width angle [x y] @@ -1125,7 +1125,7 @@ class SetParser(UserFileComponentParser): An undocumented feature is: SET CENTRE[/MAIN|/HAB] x y [d1 d2] - where d1 and d2 are pixel sizes. This is not used in the old parser, but user files have it nontheless. + where d1 and d2 are pixel sizes. This is not used in the old parser, but user files have it nonetheless. SET SCALES s a b c d """ @@ -1691,7 +1691,7 @@ class FitParser(UserFileComponentParser): fit_string = re.sub(self._lin_or_log_or_poly_to_remove, "", fit_string) # We should now have something like [poly_order] [w1 w2] - # There are four posibilties + # There are four possibilities # 1. There is no number # 2. There is one number -> it has to be the poly_order # 3. There are two numbers -> it has to be the w1 and w2 diff --git a/scripts/SCD_Reduction/ICCFitTools.py b/scripts/SCD_Reduction/ICCFitTools.py index 15c722b3a1a..4b960fd67e7 100644 --- a/scripts/SCD_Reduction/ICCFitTools.py +++ b/scripts/SCD_Reduction/ICCFitTools.py @@ -456,7 +456,7 @@ def getHKLMask(UB, frac=0.5, dQPixel=0.005, dQ=None): def padeWrapper(x, a, b, c, d, f, g, h, i, j, k): """ - padeWrapper is a wrapper for the pade(c,x) function for compatability with curve_fit. + padeWrapper is a wrapper for the pade(c,x) function for compatibility with curve_fit. Inputs are x (numpy array) and the 8 coefficients for the approximant. Output are the values of the pade approximant at each value of x. """ @@ -575,7 +575,7 @@ def getTOFWS(box, flightPath, scatteringHalfAngle, tofPeak, peak, qMask, zBG=-1. workspaceNumber - None of not doing multiple fits. Otherwise it will append an integer in the mtd[] object so not to overwrite. Probably not needed in most cases. neigh_length_m - integer; how large of a convolution box to use. - pp_lambda - the most likely backgorund level; set to None if want to calculate + pp_lambda - the most likely background level; set to None if want to calculate calc_pp_lambda - boolean; True if you want to calculate pp_lambda using TOF profile fitting. If you do not want to, you can feed the value in as pp_lambda (calculated elsewhere). minppl_frac, maxppl_frac; range around predicted pp_lambda to check. @@ -696,7 +696,7 @@ def oneOverXSquared(x, A, bg): def getInitialGuess(tofWS, paramNames, energy, flightPath, padeCoefficients): """ - Returns intial parameters for fitting based on a few quickly derived TOF + Returns initial parameters for fitting based on a few quickly derived TOF profile parameters. tofWS is a worskapce containng the TOF profile, paramNames is the list of parameter names energy is the energy of the peak (units: eV) @@ -733,7 +733,7 @@ def getSample(run, DetCalFile, workDir, fileName, qLow=-25, qHigh=25, q_frame=' workDir - not used. TODO - remove this. fileName - str; the events file to load. Should probably be an absolute path. qLow, qHigh - the returned MDWorkspace will range from qLow to qHigh in all 3 directions. - q_frame - either 'sample' or 'lab'. Wether to return in the lab or sample coordinate system. + q_frame - either 'sample' or 'lab'. Whether to return in the lab or sample coordinate system. Returns: MDdata - a handle for the mtd['MDdata'] object, which contains the loaded run in reciprocal space. """ @@ -855,7 +855,7 @@ def doICCFit(tofWS, energy, flightPath, padeCoefficients, constraintScheme=None, fitResults - the output from Mantid's Fit() routine fICC - an IkedaCarpenterConvoluted function with parameters set to the fit values. """ - # Set up our inital guess + # Set up our initial guess fICC = ICC.IkedaCarpenterConvoluted() fICC.init() paramNames = [fICC.getParamName(x) for x in range(fICC.numParams())] diff --git a/scripts/SCD_Reduction/ReduceSCD.config b/scripts/SCD_Reduction/ReduceSCD.config index 324b3883589..f0326864456 100644 --- a/scripts/SCD_Reduction/ReduceSCD.config +++ b/scripts/SCD_Reduction/ReduceSCD.config @@ -1,22 +1,22 @@ # Configuration file for ReduceSCD_OneRun.py and ReduceSCD_Parallel.py. # # Each line can either start with a comment, indicated by a '#' mark or start -# with a parameter name and value, optionally followed by a comment. ALL -# parameters used by the script must be specified. If a required parameter -# is not specified, the script will terminate with a message indicating which +# with a parameter name and value, optionally followed by a comment. ALL +# parameters used by the script must be specified. If a required parameter +# is not specified, the script will terminate with a message indicating which # parameter was missing. # # # _v1: December 3rd 2013. Mads Joergensen -# This version now includes the posibility to use the 1D cylindrical integration method -# and the posibility to load a UB matrix which will be used for integration of the individual +# This version now includes the possibility to use the 1D cylindrical integration method +# and the possibility to load a UB matrix which will be used for integration of the individual # runs and to index the combined file (Code from Xiapoing). # # # _v2: December 3rd 2013. Mads Joergensen -# Adds the posibility to optimize the loaded UB for each run for a better peak prediction +# Adds the possibility to optimize the loaded UB for each run for a better peak prediction # It is also possible to find the common UB by using lattice parameters of the first # run or the loaded matirix instead of the default FFT method # @@ -41,7 +41,7 @@ calibration_file_2 None # must be copied into one directory and that directory must be specified as # the data_directory # -data_directory None +data_directory None output_directory /SNS/TOPAZ/IPTS-9890/shared/SPAnH # Change to true for data with lots of peaks. Use False for ISAW ASCII output output_nexus False @@ -68,7 +68,7 @@ min_monitor_tof 1000 max_monitor_tof 12500 # -# Read the UB matrix from file. This option will be applied to each run and used for +# Read the UB matrix from file. This option will be applied to each run and used for # combined file. This option is especially helpful for 2nd frame TOPAZ data. read_UB False UB_filename /SNS/TOPAZ/IPTS-9890/shared/test/test.mat @@ -77,22 +77,22 @@ UB_filename /SNS/TOPAZ/IPTS-9890/shared/test/test.mat optimize_UB True # Use FundUBUsingLatticeParameters to find common UB (instead for FFT) -# This option will find the UB for the fist run and the cell parametes in the +# This option will find the UB for the fist run and the cell parameters in the # algorithm, unless a UB has been specified: in this case the values in the specified # file will be used. UseFirstLattice True # -# Specifiy a conventional cell type and centering. If these are None, only +# Specify a conventional cell type and centering. If these are None, only # one .mat and .integrate file will be written for this run, and they will -# be in terms of the Niggli reduced cell. If these specifiy a valid +# be in terms of the Niggli reduced cell. If these specify a valid # cell type and centering, an additional .mat and .integrate file will be # written for the specified cell_type and centering. NOTE: If run in # parallel, the driving script will only read the Niggli version of the # .integrate file, and will combine, re-index and convert to a conventional # cell, so these can usually be left as None. # -# Cell transformation is not applied to cylindrical profiles, +# Cell transformation is not applied to cylindrical profiles, # i.e. use None if cylindrical integration is used! # cell_type None @@ -102,29 +102,29 @@ allow_perm True # # Number of peaks to find, per run, both for getting the UB matrix, # AND to determine how many peaks are integrated, if peak positions are -# NOT predicted. NOTE: This number must be choosen carefully. If too +# NOT predicted. NOTE: This number must be chosen carefully. If too # many peaks are requested, find peaks will take a very long time and # the returned peaks will probably not even index, since most of them # will be "noise" peaks. If too few are requested, then there will be -# few peaks to be integrated, and the UB matrix may not be as accurate +# few peaks to be integrated, and the UB matrix may not be as accurate # as it should be for predicting peaks to integrate. # num_peaks_to_find 400 # -# min_d, max_d and tolerance control indexing peaks. max_d is also +# min_d, max_d and tolerance control indexing peaks. max_d is also # used to specify a threshold for the separation between peaks # returned by FindPeaksMD, so it should be specified somewhat larger -# than the largest cell edge in the Niggli reduced cell for the +# than the largest cell edge in the Niggli reduced cell for the # sample. # min_d 8 -max_d 20 +max_d 20 tolerance 0.12 # -# If predicted peak positions are to be integrated, -# the integrate_predicted_peaks flag should be set to True and the range +# If predicted peak positions are to be integrated, +# the integrate_predicted_peaks flag should be set to True and the range # of wavelengths and d-spacings must be specified # integrate_predicted_peaks True @@ -152,24 +152,24 @@ bkg_inner_radius 0.075 # for sphere or ellipse integration bkg_outer_radius 0.095 # for sphere or ellipse integration integrate_if_edge_peak True # for sphere integration only -# +# # Specify ellispe integration control parameters # -ellipse_region_radius 0.16 -ellipse_size_specified True +ellipse_region_radius 0.16 +ellipse_size_specified True # # Specify fit peaks integration control parameters. Check that these are -# correct, if use_fit_peaks_integration = True. Otherwise the values +# correct, if use_fit_peaks_integration = True. Otherwise the values # aren't used. # rebin_step -0.004 preserve_events True -use_ikeda_carpenter False +use_ikeda_carpenter False n_bad_edge_pixels 0 -# +# # Specify cylindrical integration control parameters # cylinder_radius 0.05 @@ -180,7 +180,7 @@ cylinder_length 0.30 # multiple runs in parallel. # ========================================================================== # -exp_name SPAnH +exp_name SPAnH reduce_one_run_script ReduceSCD_OneRun.py # @@ -194,18 +194,17 @@ run_nums 8512:8523 run_nums 8525:8551 # -# Specify the slurm partion, or None to use local processes. The parameter -# max_processes controls the maximum number of processes that will be run +# Specify the slurm partition, or None to use local processes. The parameter +# max_processes controls the maximum number of processes that will be run # simultaneously locally, or that will be simultaneously submitted to slurm. -# The value of max_processes should be choosen carefully with the size of the -# system in mind, to avoid overloading the system. Since the lower level +# The value of max_processes should be chosen carefully with the size of the +# system in mind, to avoid overloading the system. Since the lower level # calculations are all multi-threaded, this should be substantially lower than # the total number of cores available. # All runs will be processed eventually. If there are more runs than then # max_processes, as some processes finish, new ones will be started, until # all runs have been processed. # -#slurm_queue_name topazq -slurm_queue_name None -max_processes 13 - +#slurm_queue_name topazq +slurm_queue_name None +max_processes 13 diff --git a/scripts/SCD_Reduction/ReduceSCD_OneRun.py b/scripts/SCD_Reduction/ReduceSCD_OneRun.py index ca3a3f4d0ed..f24b249606a 100644 --- a/scripts/SCD_Reduction/ReduceSCD_OneRun.py +++ b/scripts/SCD_Reduction/ReduceSCD_OneRun.py @@ -21,12 +21,12 @@ # # _v1: December 3rd 2013. Mads Joergensen -# This version now includes the posibility to use the 1D cylindrical integration method -# and the posibility to load a UB matrix which will be used for integration of the individual +# This version now includes the possibility to use the 1D cylindrical integration method +# and the possibility to load a UB matrix which will be used for integration of the individual # runs and to index the combined file (Code from Xiapoing). # # _v2: December 3rd 2013. Mads Joergensen -# Adds the posibility to optimize the loaded UB for each run for a better peak prediction +# Adds the possibility to optimize the loaded UB for each run for a better peak prediction # It is also possible to find the common UB by using lattice parameters of the first # run or the loaded matirix instead of the default FFT method # @@ -342,7 +342,7 @@ else: SaveIsawPeaks(InputWorkspace=peaks_ws, AppendFile=False, Filename=run_niggli_integrate_file ) -# Print warning if user is trying to integrate using the cylindrical method and transorm the cell +# Print warning if user is trying to integrate using the cylindrical method and transform the cell if use_cylindrical_integration: if (cell_type is not None) or (centering is not None): print("WARNING: Cylindrical profiles are NOT transformed!!!") diff --git a/scripts/SCD_Reduction/ReduceSCD_Parallel.py b/scripts/SCD_Reduction/ReduceSCD_Parallel.py index 2b32abb6c91..b0c5b99794c 100644 --- a/scripts/SCD_Reduction/ReduceSCD_Parallel.py +++ b/scripts/SCD_Reduction/ReduceSCD_Parallel.py @@ -22,14 +22,14 @@ # # _v1: December 3rd 2013. Mads Joergensen -# This version now includes the posibility to use the 1D cylindrical integration method -# and the posibility to load a UB matrix which will be used for integration of the individual +# This version now includes the possibility to use the 1D cylindrical integration method +# and the possibility to load a UB matrix which will be used for integration of the individual # runs and to index the combined file (Code from Xiapoing). # # # _v2: December 3rd 2013. Mads Joergensen -# Adds the posibility to optimize the loaded UB for each run for a better peak prediction +# Adds the possibility to optimize the loaded UB for each run for a better peak prediction # It is also possible to find the common UB by using lattice parameters of the first # run or the loaded matirix instead of the default FFT method # @@ -225,7 +225,7 @@ if not use_cylindrical_integration: # # Load the combined file and re-index all of the peaks together. -# Save them back to the combined Niggli file (Or selcted UB file if in use...) +# Save them back to the combined Niggli file (Or selected UB file if in use...) # if output_nexus: peaks_ws = Load( Filename=niggli_integrate_file ) diff --git a/scripts/SCD_Reduction/TOPAZ.config b/scripts/SCD_Reduction/TOPAZ.config index 06bf251ccec..52a17763b14 100644 --- a/scripts/SCD_Reduction/TOPAZ.config +++ b/scripts/SCD_Reduction/TOPAZ.config @@ -15,7 +15,7 @@ calibration_file_2 None # must be copied into one directory and that directory must be specified as # the data_directory # -data_directory None +data_directory None output_directory None # @@ -33,8 +33,8 @@ min_monitor_tof 1000 max_monitor_tof 12500 # -# Read the UB matrix from file. This option will be applied to each run and -# used for combined file. This option is especially helpful for 2nd frame +# Read the UB matrix from file. This option will be applied to each run and +# used for combined file. This option is especially helpful for 2nd frame # TOPAZ data. read_UB False UB_filename None @@ -43,22 +43,22 @@ UB_filename None optimize_UB True # Use FundUBUsingLatticeParameters to find common UB (instead for FFT) -# This option will find the UB for the fist run and the cell parametes in the -# algorithm, unless a UB has been specified: in this case the values in the +# This option will find the UB for the fist run and the cell parameters in the +# algorithm, unless a UB has been specified: in this case the values in the # specified file will be used. UseFirstLattice True # -# Specifiy a conventional cell type and centering. If these are None, only +# Specify a conventional cell type and centering. If these are None, only # one .mat and .integrate file will be written for this run, and they will -# be in terms of the Niggli reduced cell. If these specifiy a valid +# be in terms of the Niggli reduced cell. If these specify a valid # cell type and centering, an additional .mat and .integrate file will be # written for the specified cell_type and centering. NOTE: If run in # parallel, the driving script will only read the Niggli version of the # .integrate file, and will combine, re-index and convert to a conventional # cell, so these can usually be left as None. # -# Cell trnasformation is not applied to cylindrical profiles, +# Cell trnasformation is not applied to cylindrical profiles, # i.e. use None if cylindrical integration is used! # cell_type None @@ -67,29 +67,29 @@ centering None # # Number of peaks to find, per run, both for getting the UB matrix, # AND to determine how many peaks are integrated, if peak positions are -# NOT predicted. NOTE: This number must be choosen carefully. If too +# NOT predicted. NOTE: This number must be chosen carefully. If too # many peaks are requested, find peaks will take a very long time and # the returned peaks will probably not even index, since most of them # will be "noise" peaks. If too few are requested, then there will be -# few peaks to be integrated, and the UB matrix may not be as accurate +# few peaks to be integrated, and the UB matrix may not be as accurate # as it should be for predicting peaks to integrate. # num_peaks_to_find 500 # -# min_d, max_d and tolerance control indexing peaks. max_d is also +# min_d, max_d and tolerance control indexing peaks. max_d is also # used to specify a threshold for the separation between peaks # returned by FindPeaksMD, so it should be specified somewhat larger -# than the largest cell edge in the Niggli reduced cell for the +# than the largest cell edge in the Niggli reduced cell for the # sample. # min_d 4 -max_d 8 +max_d 8 tolerance 0.12 # -# If predicted peak positions are to be integrated, -# the integrate_predicted_peaks flag should be set to True and the range +# If predicted peak positions are to be integrated, +# the integrate_predicted_peaks flag should be set to True and the range # of wavelengths and d-spacings must be specified # integrate_predicted_peaks False @@ -118,23 +118,23 @@ bkg_inner_radius 0.075 # for sphere or ellipse integration bkg_outer_radius 0.095 # for sphere or ellipse integration integrate_if_edge_peak True # for sphere integration only -# +# # Specify ellispe integration control parameters # -ellipse_region_radius 0.16 -ellipse_size_specified False +ellipse_region_radius 0.16 +ellipse_size_specified False # # Specify fit peaks integration control parameters. Check that these are -# correct, if use_fit_peaks_integration = True. Otherwise the values +# correct, if use_fit_peaks_integration = True. Otherwise the values # aren't used. # rebin_step -0.004 preserve_events True -use_ikeda_carpenter False +use_ikeda_carpenter False n_bad_edge_pixels 0 -# +# # Specify cylindrical integration control parameters # cylinder_radius 0.05 @@ -148,7 +148,7 @@ cylinder_profile_fit Gaussian # multiple runs in parallel. # ========================================================================== # -exp_name None +exp_name None reduce_one_run_script ReduceSCD_OneRun.py # @@ -161,17 +161,17 @@ reduce_one_run_script ReduceSCD_OneRun.py #run_nums 8525:8551 # -# Specify the slurm partion, or None to use local processes. The parameter -# max_processes controls the maximum number of processes that will be run +# Specify the slurm partition, or None to use local processes. The parameter +# max_processes controls the maximum number of processes that will be run # simultaneously locally, or that will be simultaneously submitted to slurm. -# The value of max_processes should be choosen carefully with the size of the -# system in mind, to avoid overloading the system. Since the lower level +# The value of max_processes should be chosen carefully with the size of the +# system in mind, to avoid overloading the system. Since the lower level # calculations are all multi-threaded, this should be substantially lower than # the total number of cores available. # All runs will be processed eventually. If there are more runs than then # max_processes, as some processes finish, new ones will be started, until # all runs have been processed. # -#slurm_queue_name topazq -#slurm_queue_name None -#max_processes 13 +#slurm_queue_name topazq +#slurm_queue_name None +#max_processes 13 diff --git a/scripts/reduction/instruments/sans/sans_reduction_steps.py b/scripts/reduction/instruments/sans/sans_reduction_steps.py index f3d77e98598..ee63e251d12 100644 --- a/scripts/reduction/instruments/sans/sans_reduction_steps.py +++ b/scripts/reduction/instruments/sans/sans_reduction_steps.py @@ -95,7 +95,7 @@ class BaseTransmission(ReductionStep): def set_dark_current(self, dark_current=None): """ - Set the dark current data file to be subtracted from each tranmission data file + Set the dark current data file to be subtracted from each transmission data file @param dark_current: path to dark current data file """ self._dark_current_data = dark_current @@ -173,7 +173,7 @@ class Mask(ReductionStep): def __init__(self): """ - Initalize masking + Initialize masking """ super(Mask, self).__init__() self._nx_low = 0 @@ -217,7 +217,7 @@ class Mask(ReductionStep): def _infinite_plane(self, id, plane_pt, normal_pt, complement=False): """ - Generates xml code for an infinte plane + Generates xml code for an infinite plane @param id: a string to refer to the shape by @param plane_pt: a point in the plane @param normal_pt: the direction of a normal to the plane @@ -232,7 +232,7 @@ class Mask(ReductionStep): def _infinite_cylinder(self, centre, radius, axis, id='shape'): """ Generates xml code for an infintely long cylinder - @param centre: a tupple for a point on the axis + @param centre: a tuple for a point on the axis @param radius: cylinder radius @param axis: cylinder orientation @param id: a string to refer to the shape by @@ -246,7 +246,7 @@ class Mask(ReductionStep): def _finite_cylinder(self, centre, radius, height, axis, id='shape'): """ Generates xml code for an infintely long cylinder - @param centre: a tupple for a point on the axis + @param centre: a tuple for a point on the axis @param radius: cylinder radius @param height: cylinder height @param axis: cylinder orientation @@ -389,7 +389,7 @@ class CalculateNorm(object): distribution/non-distribution flag set correctly as they maybe converted ISIS only - ORNL doesnt't use that approach + ORNL doesn't use that approach """ TMP_WORKSPACE_NAME = '__CalculateNorm_loaded_temp' diff --git a/scripts/reduction_workflow/instruments/sans/hfir_command_interface.py b/scripts/reduction_workflow/instruments/sans/hfir_command_interface.py index f105ac1a89e..4f4061e7da9 100644 --- a/scripts/reduction_workflow/instruments/sans/hfir_command_interface.py +++ b/scripts/reduction_workflow/instruments/sans/hfir_command_interface.py @@ -514,7 +514,7 @@ def NoIQxQy(): def Mask(nx_low=0, nx_high=0, ny_low=0, ny_high=0, component_name=""): ''' - Maks edges of a component_name + Mask edges of a component_name By default is the main detector for both GPSANS and BioSans ''' ReductionSingleton().reduction_properties["MaskedEdges"] = [ diff --git a/scripts/test/DirectPropertyManater_OldInterfaceXest.py b/scripts/test/DirectPropertyManater_OldInterfaceXest.py index e5e05096db8..ab99474b541 100644 --- a/scripts/test/DirectPropertyManater_OldInterfaceXest.py +++ b/scripts/test/DirectPropertyManater_OldInterfaceXest.py @@ -208,7 +208,7 @@ class DirectEnergyConversionTest(unittest.TestCase): def f_nxs(workspace, filename): tReducer.test_name += (workspace.name()+'_file_nxs_' + filename) - # redefine test save methors to produce test ouptut + # redefine test save methors to produce test output tReducer._DirectEnergyConversion__save_formats['.spe']=lambda workspace,filename: f_spe(workspace,filename) tReducer._DirectEnergyConversion__save_formats['.nxspe']=lambda workspace,filename : f_nxspe(workspace,filename) tReducer._DirectEnergyConversion__save_formats['.nxs']=lambda workspace,filename : f_nxs(workspace,filename) diff --git a/scripts/test/PyChopTest.py b/scripts/test/PyChopTest.py index 6b3bebc234f..279d6ee18b0 100644 --- a/scripts/test/PyChopTest.py +++ b/scripts/test/PyChopTest.py @@ -44,7 +44,7 @@ class PyChop2Tests(unittest.TestCase): flux = [] for inc, variant in enumerate(variants): chopobj = PyChop2('LET', variant) - # Checks that it instanciates the correct variant + # Checks that it instantiates the correct variant self.assertTrue(variant in chopobj.getChopper()) # Code should give an error if the chopper settings and Ei have # not been set. diff --git a/scripts/test/SANS/user_file/state_director_test.py b/scripts/test/SANS/user_file/state_director_test.py index 6449633c231..061e6db6bf1 100644 --- a/scripts/test/SANS/user_file/state_director_test.py +++ b/scripts/test/SANS/user_file/state_director_test.py @@ -197,7 +197,7 @@ class UserFileStateDirectorISISTest(unittest.TestCase): if os.path.exists(user_file_path): os.remove(user_file_path) - def test_stat_can_be_crated_from_valid_user_file_and_later_on_reset(self): + def test_stat_can_be_created_from_valid_user_file_and_later_on_reset(self): # Arrange file_information = SANSFileInformationMock(instrument=SANSInstrument.SANS2D, run_number=22024) data_builder = get_data_builder(SANSFacility.ISIS, file_information) diff --git a/scripts/test/SANSCommandInterfaceTest.py b/scripts/test/SANSCommandInterfaceTest.py index fdf744afee5..397c274d1ce 100644 --- a/scripts/test/SANSCommandInterfaceTest.py +++ b/scripts/test/SANSCommandInterfaceTest.py @@ -389,7 +389,7 @@ class TestLARMORCommand(unittest.TestCase): selected_idf = "LARMOR_Definition_NONEXIST.xml" # Act + Assert self.assertFalse(command_iface.LARMOR(selected_idf), - "A non existant idf path should return false") + "A non existent idf path should return false") class TestMaskFile(unittest.TestCase): def test_throws_for_user_file_with_invalid_extension(self): diff --git a/scripts/test/SANSReducerTest.py b/scripts/test/SANSReducerTest.py index 9bb49dfc022..0aa6c029c2a 100644 --- a/scripts/test/SANSReducerTest.py +++ b/scripts/test/SANSReducerTest.py @@ -9,7 +9,7 @@ import ISISCommandInterface as ici class TestReductionStateTransferer(unittest.TestCase): def test_that_state_is_transfered(self): """ - This test shows that some state can be transfered between the logic instances + This test shows that some state can be transferred between the logic instances of the ReducerSingelton. """ # 1. Create a ReudcerSingleton and apply the user file settings @@ -20,7 +20,7 @@ class TestReductionStateTransferer(unittest.TestCase): # 2. Change a setting (simulates a gui change) ici.ReductionSingleton().to_Q._use_gravity = False - # 3. Creat a transfer object such that this change is stored when the user file is applied again + # 3. Create a transfer object such that this change is stored when the user file is applied again transfer_state = ReductionStateTransferer() transfer_state.get_copy_of_reducer(ici.ReductionSingleton()) diff --git a/scripts/test/SANSUtilityTest.py b/scripts/test/SANSUtilityTest.py index 68b2d728ed3..a10bd3aba50 100644 --- a/scripts/test/SANSUtilityTest.py +++ b/scripts/test/SANSUtilityTest.py @@ -141,7 +141,7 @@ class SANSUtilityTest(unittest.TestCase): # '>1':[[1, -1]], # just lower bound # '<5':[[-1, 5]], # just upper bound # '<5,8-9': [[-1, 5], [8,9]], - # '1:2:5': [[1,3], [3,5]] # sintax: start, step, stop + # '1:2:5': [[1,3], [3,5]] # syntax: start, step, stop # } # for (k, v) in inputs.items(): @@ -370,7 +370,7 @@ class AddOperationTest(unittest.TestCase): times1 = prop_in1.times times2 = prop_in2.times - # Total time differnce is TIME1 - (TIME2 + extraShift) + # Total time difference is TIME1 - (TIME2 + extraShift) shift = 0.0 if isOverlay: shift = time_duration.total_nanoseconds(DateAndTime(time1)- DateAndTime(time2))/1e9 - extra_time_shift -- GitLab