Skip to content

Stop crash when one part of mosaic doesn't exist#266

Merged
low-sky merged 1 commit intomasterfrom
missing-mosaic-parts
Oct 30, 2025
Merged

Stop crash when one part of mosaic doesn't exist#266
low-sky merged 1 commit intomasterfrom
missing-mosaic-parts

Conversation

@thomaswilliamsastro
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

@e-koch e-koch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@thomaswilliamsastro
Copy link
Copy Markdown
Collaborator Author

Edits made, though I think hold off on merging since @akleroy wanted to have a look at this post-JWST

@low-sky low-sky merged commit 07ba423 into master Oct 30, 2025
@thomaswilliamsastro thomaswilliamsastro deleted the missing-mosaic-parts branch October 30, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants