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-37884: Include all evaluateMeanPsfFwhm in try/except blocks #249

Merged
merged 1 commit into from Feb 8, 2023

Conversation

arunkannawadi
Copy link
Member

This PR introduces the fix that should have been in place in #246 . All evaluateMeanPsfFwhm calls must be within an except block and should be called only after getPsfFwhm has been tried first.

except InvalidParameterError:
self.log.info("Unable to evaluate PSF at the average position. "
"Evaluting PSF on a grid of points."
)
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know if logging this information in many places is helpful. For a given template with a CoaddPsf error, this line might end up appearing several times.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're right. This message would appear once already from subtractImages.py, so I would suggest downgrading the log messages here (and below) to debug

Copy link
Contributor

@isullivan isullivan left a comment

Choose a reason for hiding this comment

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

Looks good. I would suggest these logs be downgraded to debug to reduce the clutter.

except InvalidParameterError:
self.log.info("Unable to evaluate PSF at the average position. "
"Evaluting PSF on a grid of points."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're right. This message would appear once already from subtractImages.py, so I would suggest downgrading the log messages here (and below) to debug

templateFwhmPix = getPsfFwhm(template.psf)
scienceFwhmPix = getPsfFwhm(science.psf)
except InvalidParameterError:
self.log.info("Unable to evaluate PSF at the average position. "
Copy link
Contributor

Choose a reason for hiding this comment

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

As above, downgrade to debug

@arunkannawadi
Copy link
Member Author

Thanks for the comment, Ian. I downgraded the logging level for these to be DEBUG.

@arunkannawadi arunkannawadi merged commit cc3ba21 into main Feb 8, 2023
@arunkannawadi arunkannawadi deleted the tickets/DM-37884 branch February 8, 2023 21:05
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