webbpsf icon indicating copy to clipboard operation
webbpsf copied to clipboard

update webbpsf for compatibility with photutils 2.0

Open mperrin opened this issue 1 year ago • 2 comments

Something in the just-released photutils 2.0 seems to have changed such that test which used to pass for webbpsf are now failing. See for instance https://github.com/spacetelescope/webbpsf/actions/runs/11598524893/job/32294569438?pr=923

@larrybradley might you have any quick suggestions on what we could look into for this?

mperrin avatar Oct 30 '24 20:10 mperrin

@mperrin Yes, GriddedPSFModel uses an bicubic interpolator (RectBivariateSpline) to evaluate the model. This requires at least 4 points in both x and y, hence the minimum PSF size is 4x4 pixels. Previously, if one initialized a GriddedPSFModel with a PSF size smaller than 4x4 pixels, one would get a cryptic error from scipy when trying to evaluate the model. In photutils 2.0, I added a check for this that raises an informative error message when the model is initialized (that you are seeing in your test failure): ValueError: The length of the PSF x and y axes must both be at least 4.

larrybradley avatar Oct 30 '24 21:10 larrybradley

Aha thanks. So my trick in some CI test function to make some with 1x1 size to speed runtime doesn’t work anymore! Got it. Will make that test case use 4x4.

mperrin avatar Oct 30 '24 21:10 mperrin