Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nest the if statements to protect against empty file list #1243

Merged
merged 3 commits into from
Apr 14, 2023

Conversation

bhilbert4
Copy link
Collaborator

@bhilbert4 bhilbert4 commented Apr 8, 2023

Resolves #1241

The bias monitor was crashing in a case where the database entry for the calibrated file name was empty. The check for this was in place, but incorrectly combined with a check that the given filename pointed to a real file. This PR splits those two conditions into two if statements, in order to correctly catch each issue.

  • Still need to test on the test server

@bhilbert4 bhilbert4 self-assigned this Apr 8, 2023
@bhilbert4
Copy link
Collaborator Author

@mfixstsci this is ready for review. Just a few plot tweaks from @bsunnquist 's feedback, and breaking up a compound if statement into two nested if statements, in order to avoid the indexing error in the linked issue.

@bhilbert4
Copy link
Collaborator Author

I tested locally and on the test server, and all plots look good.

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, everything looks great. Just to be clear, the checked box means you did check it on test?

@mfixstsci mfixstsci merged commit a425326 into spacetelescope:develop Apr 14, 2023
4 checks passed
@bhilbert4 bhilbert4 deleted the bias-monitor-index-error branch April 14, 2023 22:36
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.

bias monitor crashing with indexing error
2 participants