ReductionRecipe: check fully-masked group using PGP.isMasked flags #546
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 fixes a critical defect due to the previous implementation of the
_isGroupFullyMasked
method. In addition, the current implementation makes use of the already calculatedPixelGroupingParameters.isMasked
flags, which are set for any fully-masked subgroups in a grouping schema.Explanation of work
This commit includes the following changes:
ReductionRecipe._isGroupFullyMasked
so it actually evaluates whether or not every pixel within every subgroup of a grouping schema is masked.The previous implementation of this method was based on the assumption that each spectrum of a grouping workspace contained a list of the indices of all of the pixels participating in a subgroup of the schema, with the subgroup-id corresponding to spectrum index. On the contrary, each spectrum of a grouping workspace contains a single value, which is the subgroup-id of the pixel with the same detector-index as that the spectrum-index. The net effect if this confusion was that any mask workspace that had a small number of the lowest-index pixels masked, corresponding to the number of subgroups in the schema (+ 1), would result in the method determining that every subgroup in the schema was fully masked, which was clearly incorrect.
To test
Dev testing
Existing unit tests have been modified to cover these new changes.
CIS testing
To duplicate the original defect, please see the EWM item.
Link to EWM item
EWM#9603