Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 2287 2319 +32
Branches 261 261
=========================================
+ Hits 2287 2319 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PR (re-)streamlines accessing the
maskattribute of aLazyMaskso that it no longer requires an argument and can be a@property. It then adds features inmasks.pyto allow lazily combining twoMaskCollections via lazy merging ofLazyMasks, and significantly reduces the number of references toSWIFTGalaxyobjects that we need to keep around attached to masks.LazyMaskandMaskCollectionnow mostly don't need to know aboutSWIFTGalaxy, except to retrieve a particle count from the metadata when combining masks, which now just asks for the relevantSWIFTGalaxyat the relevant time.Tests have been fleshed out and confirm that we can now delay evaluating masks (and therefore reading any data needed to evaluate them) indefinitely - only when a data read of the relevant particle type is triggered is the mask actually evaluated. Previously we could trigger reading data to evaluate masks for all types when applying a second mask because the masks could not be combined lazily. The implementation is also such that we don't end up with an insane function stack when we combine masks, just a chain of masks applied to
np.arange(num_part).Closes #79