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

subtract_psf in PSF Photometry fails for fitshape equal in length to input data #818

Closed
Onoddil opened this issue Apr 8, 2019 · 0 comments · Fixed by astropy/astropy#9118 · May be fixed by #833
Closed

subtract_psf in PSF Photometry fails for fitshape equal in length to input data #818

Onoddil opened this issue Apr 8, 2019 · 0 comments · Fixed by astropy/astropy#9118 · May be fixed by #833
Labels

Comments

@Onoddil
Copy link
Contributor

Onoddil commented Apr 8, 2019

subtract_psf, used in BasicPSFPhotometry.nstar (and thus all classes based off this class) will fail with ValueError: Can't add array. Small array too large. if fitshape has shape equal in at least one length to data.shape.

This is due to subtract_psf using astropy.nddata.add_array if subshape is None evaluates false. add_array fails to check if sizes are greater than or equal; I plan to put in a pull request through astropy to fix this. However, for exactly equal fitshape and data shape if subshape is None could be amended to if subshape is None or np.all(i == j for i, j in zip(fitshape, data.shape)) or equivalent.

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