Fix crash for different atm types in casaSingleDishALMAWrapper.py#343
Merged
Conversation
Fixes #311. This PR fixes a crash when TP data uses different atmospheric types. I think this happens in the `hsd_atmcor` call in the TP pipeline but what matters is that dependending on the model, the output filename is different. This just fixes that to search more generally. It'll warn if no files are found for a particular EB, and will raise an Error if multiple files are found for a particular EB. - Use glob to find baselined files for different atmtypes - Updated changelog
7eb29cc to
a4f8acc
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #343 +/- ##
=========================================
- Coverage 6.27% 6.27% -0.01%
=========================================
Files 38 38
Lines 15204 15211 +7
Branches 3647 3648 +1
=========================================
Hits 954 954
- Misses 14236 14243 +7
Partials 14 14 ☔ View full report in Codecov by Sentry. |
Collaborator
Author
|
@e-koch this one at least should be quick to review :) |
Collaborator
|
I had also encountered this and was vaguely worried about the glob use but had found no other way to predict / determine what the atm type was going to be. |
Collaborator
Author
|
@low-sky it also seems inconsistent! I had a hard crash with one of the M83 TP obs, but when I was testing this the atmtype it landed on was different. CASA!!! |
Collaborator
|
Yeesh. I can see why the trap for the multiple atmtypes for the same EB becomes important. |
low-sky
approved these changes
May 19, 2026
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.
Fixes #311.
This PR fixes a crash when TP data uses different atmospheric types. I think this happens in the
hsd_atmcorcall in the TP pipeline but what matters is that dependending on the model, the output filename is different. This just fixes that to search more generally. It'll warn if no files are found for a particular EB, and will raise an Error if multiple files are found for a particular EB.