Skip to content
Snippets Groups Projects
Unverified Commit 24217a7d authored by Savici, Andrei T.'s avatar Savici, Andrei T. Committed by GitHub
Browse files

Merge pull request #23257 from mantidproject/lr_scaling_factors

LR: Update default x range for scaling factors
parents c0c81a0f f7b37d33
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,9 @@ class LRScalingFactors(PythonAlgorithm):
"Pixel range defining the data peak")
self.declareProperty(IntArrayProperty("SignalBackgroundPixelRange", [147, 163]),
"Pixel range defining the background")
self.declareProperty(IntArrayProperty("LowResolutionPixelRange", [94, 160]),
self.declareProperty(IntArrayProperty("LowResolutionPixelRange",
[Property.EMPTY_INT, Property.EMPTY_INT],
direction=Direction.Input),
"Pixel range defining the region to use in the low-resolution direction")
self.declareProperty("IncidentMedium", "Medium", doc="Name of the incident medium")
self.declareProperty("FrontSlitName", "S1", doc="Name of the front slit")
......@@ -454,6 +456,12 @@ class LRScalingFactors(PythonAlgorithm):
@param background_range: range of pixels defining the background
@param low_res_range: range of pixels in the x-direction
"""
# Check low-res axis
if low_res_range[0] == Property.EMPTY_INT:
low_res_range[0] = 0
if low_res_range[1] == Property.EMPTY_INT:
low_res_range[1] = int(workspace.getInstrument().getNumberParameter("number-of-x-pixels")[0])-1
# Rebin TOF axis
tof_range = self.getProperty("TOFRange").value
tof_step = self.getProperty("TOFSteps").value
......
......@@ -25,6 +25,7 @@ class LRPrimaryFractionTest(stresstesting.MantidStressTest):
TOFRange=[10008, 35000], TOFSteps=200,
SignalPeakPixelRange=[150, 160],
SignalBackgroundPixelRange=[147, 163],
LowResolutionPixelRange=[94, 160],
ScalingFactorFile=self.cfg_file)
def validate(self):
......
......@@ -9,4 +9,8 @@ Reflectometry Changes
putting new features at the top of the section, followed by
improvements, followed by bug fixes.
Liquids Reflectometer
---------------------
- Default x-direction pixel range for the scaling factor calculation is now set to the full width of the detector as opposed to a restricted guess.
:ref:`Release 3.14.0 <v3.14.0>`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment