Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for default values of prompt peak correction for LOQ #19141

Merged
merged 3 commits into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/release/v3.10.0/sans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ Bug Fixes
- Fixed LOQ Batch mode bug where geometry information was not saved out when using SaveCanSAS1D.
- Fixed LOQ Batch mode bug where custom user file without a .txt ending was not being picked up.
- Fixed Batch mode bug where the output name suffix was hardcoded to SANS2D. It now takes the individual instruments into account.
- Fixed LOQ bug where prompt peak was not set correctly for monitor normalisation.

`Full list of changes on github <http://github.com/mantidproject/mantid/pulls?q=is%3Apr+milestone%3A%22Release+3.10%22+is%3Amerged+label%3A%22Component%3A+SANS%22>`__
13 changes: 13 additions & 0 deletions scripts/SANS/isis_reduction_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,8 @@ def __init__(self, spectrum_number=None):
self.output_wksp = None

def execute(self, reducer, workspace):
self.set_prompt_parameter_if_not_set(reducer)

normalization_spectrum = self._normalization_spectrum
if normalization_spectrum is None:
# the -1 converts from spectrum number to spectrum index
Expand Down Expand Up @@ -1980,6 +1982,17 @@ def execute(self, reducer, workspace):
r_alg = 'Rebin'
reducer.to_wavelen.execute(reducer, self.output_wksp, bin_alg=r_alg)

def set_prompt_parameter_if_not_set(self, reducer):
"""
This method sets default prompt peak values in case the user has not provided some. Currently
we only use default values for LOQ.
"""
if (reducer.transmission_calculator.removePromptPeakMin is None and
reducer.transmission_calculator.removePromptPeakMax is None):
if reducer.instrument.name() == "LOQ":
reducer.transmission_calculator.removePromptPeakMin = 19000.0 # Units of micro-seconds
reducer.transmission_calculator.removePromptPeakMax = 20500.0 # Units of micro-seconds


class TransmissionCalc(ReductionStep):
"""
Expand Down