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

add filter_non_finite argument to PSFPhotometry #1611

Open
cshanahan1 opened this issue Aug 17, 2023 · 1 comment
Open

add filter_non_finite argument to PSFPhotometry #1611

cshanahan1 opened this issue Aug 17, 2023 · 1 comment
Labels

Comments

@cshanahan1
Copy link
Contributor

cshanahan1 commented Aug 17, 2023

This was an issue that arose when trying to fit a PSF model to data with non-finite values. PSFPhotometry takes in a Fitter obj, however you can't specify filter_non_finite when instantiating a fitter class, only when its called. Because of this, theres no way to direct the fitter inside PSFPhotometry to filter nans. The solution to this would be to add a new filter_non_finite parameter to PSFPhotometry (and everything else in photutils that takes a fitter as input)

if the fitter classes were able to be initialized with filter_non_finite, this would solve the issue as well (@WilliamJamieson any thoughts?)

@larrybradley
Copy link
Member

@cshanahan1 PSFPhotometry avoids this by automatically masking all non-finite data values (see https://github.com/astropy/photutils/blob/main/photutils/psf/photometry.py#L344)
Do you have an example where this is not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants