From 406d086916dcbdd8e58e2346392da9505bb22f81 Mon Sep 17 00:00:00 2001
From: David Fairbrother <DavidFair@users.noreply.github.com>
Date: Mon, 20 Feb 2017 14:35:11 +0000
Subject: [PATCH] Re #18643 Updated param in POLARIS to reflect it is for
 focused data

---
 .../python/techniques/ISISPowder-Polaris-v1.rst   | 12 ++++++------
 scripts/Diffraction/isis_powder/polaris.py        |  2 +-
 .../polaris_routines/polaris_advanced_config.py   | 15 ++++++++++-----
 .../polaris_routines/polaris_param_mapping.py     |  2 +-
 4 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/docs/source/api/python/techniques/ISISPowder-Polaris-v1.rst b/docs/source/api/python/techniques/ISISPowder-Polaris-v1.rst
index 55fbb7b6d7a..d1d8d19517f 100644
--- a/docs/source/api/python/techniques/ISISPowder-Polaris-v1.rst
+++ b/docs/source/api/python/techniques/ISISPowder-Polaris-v1.rst
@@ -133,6 +133,12 @@ Advanced Script Parameters
   for the detectors. This file must be located at the top of the calibration
   directory as noted here :ref:`polaris_calibration_folder-powder-diffraction-ref`
 
+- `focused_cropping_values` - Stores the TOF window to crop down to on a bank-by-bank
+  basis. This is one of the final steps applied to a focused workspace. The values
+  are stored as a list of tuples, with one tuple per bank and each containing
+  the minimum and maximum values in TOF. The window specified must be less than
+  both `vanadium_cropping_values` and `raw_data_tof_cropping`
+
 - `masking_file_name` - The name of the file containing Vanadium masking information.
   This file must be located at the top of the calibration directory as noted here:
   :ref:`polaris_calibration_folder-powder-diffraction-ref`
@@ -144,12 +150,6 @@ Advanced Script Parameters
 - `spline_coefficient` - The coefficient to use whilst taking a b-spline of the
   Vanadium workspace during calibration
 
-- `tof_cropping_ranges` - Stores the TOF window to crop down to on a bank-by-bank
-  basis. This is one of the final steps applied to a focused workspace. The values
-  are stored as a list of tuples, with one tuple per bank and each containing
-  the minimum and maximum values in TOF. The window specified must be less than
-  both `vanadium_cropping_values` and `raw_data_tof_cropping`
-
 - `vanadium_cropping_values` - Stores the TOF window the vanadium workspace is
   cropped down to after focusing. This value is stored as a tuple of the minimum
   and maximum values. The TOF window should be smaller than `raw_data_cropping_values`
diff --git a/scripts/Diffraction/isis_powder/polaris.py b/scripts/Diffraction/isis_powder/polaris.py
index 32352f86eba..0b42fbbc806 100644
--- a/scripts/Diffraction/isis_powder/polaris.py
+++ b/scripts/Diffraction/isis_powder/polaris.py
@@ -47,7 +47,7 @@ class Polaris(AbstractInst):
         return True
 
     def _crop_banks_to_user_tof(self, focused_banks):
-        return common.crop_banks_in_tof(focused_banks, self._inst_settings.tof_cropping_values)
+        return common.crop_banks_in_tof(focused_banks, self._inst_settings.focused_cropping_values)
 
     def _crop_raw_to_expected_tof_range(self, ws_to_crop):
         cropped_ws = common.crop_in_tof(ws_to_crop=ws_to_crop, x_min=self._inst_settings.raw_data_crop_values[0],
diff --git a/scripts/Diffraction/isis_powder/polaris_routines/polaris_advanced_config.py b/scripts/Diffraction/isis_powder/polaris_routines/polaris_advanced_config.py
index 95ce4718ae0..dc7ac1af360 100644
--- a/scripts/Diffraction/isis_powder/polaris_routines/polaris_advanced_config.py
+++ b/scripts/Diffraction/isis_powder/polaris_routines/polaris_advanced_config.py
@@ -22,7 +22,7 @@ script_params = {
     "spline_coefficient": 100,
 }
 
-tof_cropping_ranges = [
+focused_cropping_values = [
     (1500, 19900),  # Bank 1
     (1500, 19900),  # Bank 2
     (1500, 19900),  # Bank 3
@@ -52,15 +52,20 @@ variable_help = {
                               "step."
     },
 
-    "tof_cropping_ranges": "These values are used to determine the TOF range to crop a focused (not Vanadium Cal.) "
-                           "workspace to. These are applied on a bank by bank basis. They must be less than "
-                           "the values specified for raw_data_cropping_values."
+    "focused_cropping_values": "These values are used to determine the TOF range to crop a focused (not Vanadium Cal.) "
+                               "workspace to. These are applied on a bank by bank basis. They must be less than "
+                               "the values specified for raw_data_cropping_values.",
+
+    "vanadium_cropping_values": "These values are use to determine the TOF range to crop a vanadium workspace to during"
+                                " calibration step. These are applied on a bank by bank basis and must be smaller than"
+                                " the range specified in raw_data_cropping_values and larger than the values specified"
+                                " in focused_cropping_values."
 }
 
 variables = {
     # Used by the script to find the dictionaries in advanced config.
     "file_names_dict": file_names,
     "script_params": script_params,
-    "tof_cropping_ranges": tof_cropping_ranges,
+    "tof_cropping_ranges": focused_cropping_values,
     "vanadium_cropping_values": vanadium_cropping_values
 }
diff --git a/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py b/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py
index 3c51dbe4f7f..dd7b758bba6 100644
--- a/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py
+++ b/scripts/Diffraction/isis_powder/polaris_routines/polaris_param_mapping.py
@@ -7,6 +7,7 @@ attr_mapping = [("calibration_directory",       "calibration_dir"),
                 ("config_file",                 "config_file"),
                 ("do_absorb_corrections",       "do_absorb_corrections"),
                 ("do_van_normalisation",        "do_van_normalisation"),
+                ("focused_cropping_values",     "focused_cropping_values"),
                 ("grouping_file_name",          "grouping_file_name"),
                 ("input_mode",                  "input_mode"),
                 ("masking_file_name",           "masking_file_name"),
@@ -15,7 +16,6 @@ attr_mapping = [("calibration_directory",       "calibration_dir"),
                 ("run_in_range",                "run_in_range"),
                 ("run_number",                  "run_number"),
                 ("spline_coefficient",          "spline_coeff"),
-                ("tof_cropping_ranges",         "tof_cropping_values"),
                 ("output_directory",            "output_dir"),
                 ("user_name",                   "user_name"),
                 ("vanadium_cropping_values",    "van_crop_values")]
-- 
GitLab