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

merged 3 commits into from Mar 31, 2017


None yet
3 participants

AntonPiccardoSelg commented Mar 14, 2017

Fixes #19138

The prompt peak correction was not performed correctly for LOQ. This makes sure that the default values for the monitor normalization for LOQ are set up correctly. This is a regression from M3.8

To test:

Testing this is a bit involved. You will require the test files from here:smb://olympic/babylon5/Scratch/Anton/LOQ_Prompt_Peak_Fix
Note that this folder also contains a Windows installer which you can use for testing.

We will be running a test script for this version, for 3.9.1. and for 3.8. Since you can easily install several versions of Mantid next to each other on Windows, that might be a good platform to test this PR.

  1. Run the following script in each version. Make sure that the test data is in the Mantid path:
import ISISCommandInterface as i_old
import SANSBatchMode as i_old_batch
MASKFILE = FileFinder.getFullPath('MASKLOQ_MAN_133E_Hornqvist_6mm_Furnace_MERGED.txt')
BATCHFILE = FileFinder.getFullPath('reduce_fe35cr_500c_merged_2.csv')
i_old_batch.BatchReduce(BATCHFILE, format='.nxs', saveAlgs={"SaveCanSAS1D": ".xml"}, combineDet="merged")
  1. M3.9.1 and the version with the fix will output a workspace wit the name 80523_merged_hab, the equivalient workspace on M3.8 is called 80523_merged_front. Save the workspaces to file for each version

  2. Load the three files into any version and plot the workspaces against each other.
    Confirm that the workspace from 3.8 and the fixed version overlap. Confirm that the workspace from 3.9.1 is off.

The output should look like this



Note that the red and the black line overlap and therefore only the red is visible

Release notes

See here


Please comment on the following (full description):

Code Review
  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards? Is it well structured with small focussed classes/methods/functions?
  • Are there unit/system tests in place? Are the unit tests small and test the a class in isolation?
  • If there are changes in the release notes then do they describe the changes appropriately?
Functional Tests
  • Do changes function as described? Add comments below that describe the tests performed?

  • How do the changes handle unexpected situations, e.g. bad input?

  • Has the relevant documentation been added/updated?

  • Is user-facing documentation written in a user-friendly manner?

  • Has developer documentation been updated if required?

  • Does everything look good? Comment with the ship it emoji but don't merge. A member of @mantidproject/gatekeepers will take care of it.


This comment has been minimized.

Show comment
Hide comment

DavidFair Mar 31, 2017


Run the script in Mantid 3.8 and 3.9 and observed the expected differences
This PR correctly fixed the results.


DavidFair commented Mar 31, 2017

Run the script in Mantid 3.8 and 3.9 and observed the expected differences
This PR correctly fixed the results.

@NickDraper NickDraper merged commit 8894294 into master Mar 31, 2017

9 checks passed

ClangFormat Jenkins build pull_requests-clang-format 12039 has succeeded
Doxygen Jenkins build pull_requests-doxygen 11513 has succeeded
Flake8 Jenkins build pull_requests-flake8 2805 has succeeded
OSX Jenkins build pull_requests-osx 12624 has succeeded
RHEL7 + System Tests Jenkins build pull_requests-rhel7 12589 has succeeded
Ubuntu + Doc Tests Jenkins build pull_requests-ubuntu 13140 has succeeded
Ubuntu Python 3 Jenkins build pull_requests-ubuntu-python3 693 has succeeded
Windows Jenkins build pull_requests-win7 13407 has succeeded
cppcheck Jenkins build pull_requests-cppcheck 13093 has succeeded

@NickDraper NickDraper deleted the 19138_prompt_peak_loq branch Mar 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment