Prepopulate fields for HFIRPowderReduction #40580
Open
+373
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of work
This work modifies HFIRPowderReduction so that when a user updates a field, other fields will automatically get updated based on what the user input. This will also attempt to read the experiment run files to grab data to set the fields. For example, when the user fills out the SampleFileName field with a valid file, the algorithm will attempt to read the sample file and set the Instrument field. All cases will be described in the testing section.
EWM 13209
To test:
Open the HFIRPowderReduction algorithm in Mantid and set the SampleFileName to the file that gets generated with the attached script. You must generate the file with the attached script as github won't let me attach a .h5 file.
generate_test_h5.py
Make sure the following fields get set:
Instrument
Wavelength
Vanadium diameter
Vanadium IPTS and run numbers
Vanadium bg. IPTS and run numbers
Toggle the instrument and notice that the NormalizeBy field gets updated. Make sure that it matches like so:
Wand^2 <-> Monitor
MIDAS <-> Time
Also make sure that you can overwrite any value that got prepopulated.
The user should also be able to set the Sample Run and IPTS numbers to prepopulate the same fields, but this requires run files to exist in a specific location. Since there are no real sample run files yet, just check the unit tests and make sure they test for this and that they pass.
Reviewer
Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.
As per the review guidelines:
mantid-developersormantid-contributorsteams, add a review commentrerun cito authorize/rerun the CIGatekeeper
As per the gatekeeping guidelines: