Stop crash when one part of mosaic doesn't exist#266
Merged
Conversation
e-koch
requested changes
Oct 10, 2025
Collaborator
e-koch
left a comment
There was a problem hiding this comment.
One minor change to optionally raise an error (off by default) when an expected file is missing.
Currently, the mosaicking in postprocessing will skip stitching if any "expected" files don't exist. But, it's not very smart about checking these things (it expects every part to have every configuration), so you can have an instance where you have mosaic parts that might not have certain configurations: - ngc7793_1 only has 12m - ngc7793_2 has 7m - ngc7793_3 has 7m - ngc7793_4 has 12m+7m+tp and then it'll not do a 12m mosaic of 1 and 4, or a 7m mosaic of 2/3/4. This adds some logic to check parts exist first, thus avoiding the skip. Also adds warnings if files are missing, in case this isn't intended behaviour for the end user. Importantly, this works if the heterogeneous observations don't have overlap between each other. It then just saves duplicating targets to avoid this behaviour
cdff911 to
d75e436
Compare
Collaborator
Author
|
Edits made, though I think hold off on merging since @akleroy wanted to have a look at this post-JWST |
e-koch
approved these changes
Oct 13, 2025
low-sky
approved these changes
Oct 30, 2025
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.
Currently, the mosaicking in postprocessing will skip stitching if any "expected" files don't exist. But, it's not very smart about checking these things (it expects every part to have every configuration), so you can have an instance where you have mosaic parts that might not have certain configurations:
and then it'll not do a 12m mosaic of 1 and 4, or a 7m mosaic of 2/3/4. This adds some logic to check parts exist first, thus avoiding the skip. Also adds warnings if files are missing, in case this isn't intended behaviour for the end user.
Importantly, this works if the heterogeneous observations don't have overlap between each other. It then just saves duplicating targets to avoid this behaviour