From 177bdfcb32e532f05686b24096f05634c634f6bb Mon Sep 17 00:00:00 2001
From: Harry Jeffery <henry.jeffery@stfc.ac.uk>
Date: Mon, 10 Nov 2014 14:36:32 +0000
Subject: [PATCH] Refs #10495 Document discarded magic numbers

---
 Code/Mantid/instrument/CRISP_Parameters.xml                | 4 ++++
 Code/Mantid/instrument/INTER_Parameters.xml                | 4 ++++
 Code/Mantid/instrument/POLREF_Parameters.xml               | 4 ++++
 Code/Mantid/instrument/SURF_Parameters.xml                 | 4 ++++
 Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py | 2 ++
 5 files changed, 18 insertions(+)

diff --git a/Code/Mantid/instrument/CRISP_Parameters.xml b/Code/Mantid/instrument/CRISP_Parameters.xml
index 8b05b80de69..785baa525de 100644
--- a/Code/Mantid/instrument/CRISP_Parameters.xml
+++ b/Code/Mantid/instrument/CRISP_Parameters.xml
@@ -36,10 +36,14 @@
     <value val="1"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMin's value has 1 added to it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMin">
     <value val="0.6"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMax's value has 2 subtracted from it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMax">
     <value val="6.5"/>
   </parameter>
diff --git a/Code/Mantid/instrument/INTER_Parameters.xml b/Code/Mantid/instrument/INTER_Parameters.xml
index 96216d6a8c2..43671c19f03 100644
--- a/Code/Mantid/instrument/INTER_Parameters.xml
+++ b/Code/Mantid/instrument/INTER_Parameters.xml
@@ -33,10 +33,14 @@
     <value val="2"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMin's value has 1 added to it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMin">
     <value val="1.0"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMax's value has 2 subtracted from it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMax">
     <value val="17.0"/>
   </parameter>
diff --git a/Code/Mantid/instrument/POLREF_Parameters.xml b/Code/Mantid/instrument/POLREF_Parameters.xml
index fa461e5f257..537b14c666c 100644
--- a/Code/Mantid/instrument/POLREF_Parameters.xml
+++ b/Code/Mantid/instrument/POLREF_Parameters.xml
@@ -39,10 +39,14 @@
     <value val="2"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMin's value has 1 added to it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMin">
     <value val="1.0"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMax's value has 2 subtracted from it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMax">
     <value val="15.0"/>
   </parameter>
diff --git a/Code/Mantid/instrument/SURF_Parameters.xml b/Code/Mantid/instrument/SURF_Parameters.xml
index 7b90a98646d..6c443dcccd9 100644
--- a/Code/Mantid/instrument/SURF_Parameters.xml
+++ b/Code/Mantid/instrument/SURF_Parameters.xml
@@ -33,10 +33,14 @@
     <value val="1"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMin's value has 1 added to it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMin">
     <value val="0.5"/>
   </parameter>
 
+  <!-- In the old Reflectometry UI, LambdaMax's value has 2 subtracted from it.
+       In the new Reflectometry UI, this adjustment is NOT made. -->
   <parameter name="LambdaMax">
     <value val="7.0"/>
   </parameter>
diff --git a/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py b/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
index 9159f11c0ee..ac2edbe0181 100644
--- a/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
+++ b/Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
@@ -985,6 +985,8 @@ class ReflGui(QtGui.QMainWindow, refl_window.Ui_windowRefl):
         if ',' in runno:
             runno = runno.split(',')[0]
         inst = wq.getInstrument()
+        #NOTE: In the new Refl UI, these adjustments to lmin/lmax are NOT made. This has been
+        #noted in the parameter files for INTER/CRIST/POLREF/SURF.
         lmin = inst.getNumberParameter('LambdaMin')[0] + 1
         lmax = inst.getNumberParameter('LambdaMax')[0] - 2
         qmin = 4 * math.pi / lmax * math.sin(th * math.pi / 180)
-- 
GitLab