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-40451: Update MultibandExposure.computePsfImage #709

Merged
merged 2 commits into from Sep 26, 2023
Merged

Conversation

fred3m
Copy link
Contributor

@fred3m fred3m commented Sep 13, 2023

This updates the MultibandExposure.computePsf<Kernel>Image methods to return a MultibandImage. It also adds the partial PSF to the IncompleteDataError so that users who try...except the error can obtain the PSF in all of the bands that were able to construct a PSF image.

Copy link
Contributor

@cmsaunders cmsaunders left a comment

Choose a reason for hiding this comment

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

Just a few small comments, though I will also have some comments tied to this in the meas_extensions_scarlet review.

from .._image._multiband import tripleFromSingles, tripleFromArrays, makeTripleFromKwargs
from .._maskedImage import MaskedImage


class IncompleteDataError(Exception):
"""The PSF could not be computed due to incomplete data

Attributes
Copy link
Contributor

Choose a reason for hiding this comment

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

All the __init__ arguments except bands become attributes, so maybe you don't want a Parameters section that repeats all of this, plus describes bands, but I think bands needs some documentation. I'm not sure what the convention is here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since our convention is to include Parameters in the class docstring, not the __init__ docstring, I think that it makes sense to add a Parameters sections with only bands, since the preceding Attributes section describes the other parameters.

python/lsst/afw/image/_exposure/_multiband.py Outdated Show resolved Hide resolved
python/lsst/afw/image/_exposure/_multiband.py Outdated Show resolved Hide resolved
This updates the `MultibandExposure.computePsf<Kernel>Image`
methods to return a `MultibandImage`. It also adds the partial
PSF to the `IncompleteDataError` so that users who try...except
the error can obtain the PSF in all of the bands that were able
to construct a PSF image.
@fred3m fred3m merged commit b62437f into main Sep 26, 2023
2 checks passed
@fred3m fred3m deleted the tickets/DM-40451 branch September 26, 2023 19:44
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