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
The Artificial Normalization screen requires the workflow to load a screen for adjusting parameters to create a false background. However, workflow's don't enable going forward or backward or optionally skipping screens, which prevents handling arbitrary cases of Artificial Normalization in run lists.
There are two "happy path" situations which may be considered, and which are enabled in this PR.
The other paths have been turned off by giving the user a warning.
Explanation of work
The CalibrationService and NormalizationService were updated with the ability to load a set of calibration/normalizations for a list of run numbers. Also, return a dictionary matching a list of runs to each corresponding version.
If all runs have a matching normalization version (which is not None), then reduction works as normal over the entire list, as intended.
If any of the runs requires artificial normalization, then the workflow will throw an error dialog box requiring the user to enter only a single run.
To test
Dev testing
Setup
Download files 46802, 46803, 46805. They are in IPTS-24641 and under 1GB. These are in a new state, so use SNAPRed to create a calibration and a normalization for these runs. They do not have to be good. Just use 46803 and whichever sample and step through it until both save.
Run from WORKBENCH and not just stand-alone GUI.
Hide the normalization
Hide the normalizations you just made, most easily by changing the directory name. Run reduction with 46802, 46803, 46805. SNAPRed will not let you, and require you to clear the run list and try again with a single run.
Run reduction with just 46802. It will warn about needing artificial normalization. Continue, create an art norm, then continue to the end of the workflow.
Unhide the normalization
Close SNAPRed.
Navigate to the
NormalizationIndex.json
file for this state. Edit the "appliesTo" field to "46802".Run normalization with 46802, 46803, 46805. It will complain that you must have either all or none of the runs needing artificial normalization.
Edit the "appliesTo" field to ">=46802".
Run normalization with 46802, 46803, 46805. It will run smoothly and without issue. Observe that the grouping workspaces, calibration tables, and normalizations are not being deleted, until the very end. At the end, you will have output workspaces for all three runs.
CIS testing
Follow steps similar to the above, but using the original runs 61991:61993, and valid normalizations and calibrations. They are located in
/SNS/SNAP/shared/Calibration_next
.Link to EWM item
EWM#8287
See also:
EWM#8230
Verification
Acceptance Criteria
This list is for ease of reference, and does not replace reading the EWM story as part of the review. Verify this list matches the EWM story before reviewing.