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

DM-44996: Add error handling to PSF cutouts #225

Merged
merged 2 commits into from
Jun 26, 2024
Merged

Conversation

isullivan
Copy link
Contributor

No description provided.

Copy link
Contributor

@mrawls mrawls left a comment

Choose a reason for hiding this comment

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

Approving as a reasonable fix for error handling, but I have reservations about this possibly masking a more fundamental problem with getCutout and pixel vs sky coords. I hope I'm wrong, and either way, the logs this generates about DiaSources with centers in wonky locations will help trace the issue.

cutoutPsf = None
except InvalidPsfError:
self.log.warning("Could not calculate PSF for DiaSource with "
"id=%i. InvalidPsfError encountered. Exiting."
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of "Exiting," prefer "Returning None for cutoutPsf" (as you noted above for when cutout is set to None)

@isullivan isullivan merged commit 0491626 into main Jun 26, 2024
2 checks passed
@isullivan isullivan deleted the tickets/DM-44996 branch June 26, 2024 05:48
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.

None yet

2 participants