prototype that applies any swiss cheese mask found in the ADS#579
Open
prototype that applies any swiss cheese mask found in the ADS#579
Conversation
Collaborator
Author
|
Addi suggested I create a PR for this protoype work. I don't think this is suitable for merging, but maybe this is a good way to keep tabs on my prototyping? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #579 +/- ##
==========================================
+ Coverage 95.93% 96.21% +0.27%
==========================================
Files 71 71
Lines 5660 5677 +17
==========================================
+ Hits 5430 5462 +32
+ Misses 230 215 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
walshmm
reviewed
Apr 28, 2025
Comment on lines
+42
to
+45
| self.binMasks = [] | ||
| for ws in mtd.getObjectNames(): | ||
| if "maskBins_" in ws: | ||
| self.binMasks.append(ws) |
Collaborator
There was a problem hiding this comment.
Instead of inspecting the ads for a name schema we would instead want to append this to the pixelMask list on the ReductionRequest so it may be picked up by the prepCombinedMask method in ReductionService
To accomplish this you will need to:
- Create a new WorkspaceNameGenerator name for the swisscheese mask: A. Add another template to the application.yml B. Add another workspace type to the enum C. Add another method to the WNG itself following the naming pattern
- Add a new case to the prepCombinedMask method for the new workspace type you added in the previous step, probably in the same fashion as this case
- When you submit your reduction request, use the wng to generate the name and add it to pixelMask list on the ReductionRequest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is a very primitive implementation of prototype swiss cheese mask. External to SNAPRed, I have machinery to make the swiss cheese masks and to save these to a mantid BinMaskTableWorkspace with the names:
maskBins_{units}Where units are recognised mantid units such as dSpacing, Wavelength, TOF
I then modified SNAPRed to check if any of these are present in the ADS and, if it finds these, apply them by looping through all bin_mask ws it finds, then
MaskBinsFromTablefinally, it converts units back to TOF.
Explanation of work
This is obviously not the best way to handle the operation.
I would like to make a list of BinMaskTableWorkspaces a reduction ingredient identical to pixel masks. I'd then like these to be saved the same as pixel masks.
Any advice on how to go about this appreciated!
(the machinery to make the mask can stay outside of SNAPRed and live in SNAPBlue)
To test
Dev testing
CIS testing
# replace with your test script belowLink to EWM item
EWM#<ticket_number>
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.