Closed pllim closed 8 months ago
The most significant change is the first element in the array but I don't know what that means. Maybe @bmorris3 does since the algorithm was ported from tynt
.
Old: 407.5180314841658+7.494005416219807e-16j
New: 407.5180314841659-4.4896378281755744e-14j
I agree that numpy is the likely culprit, since that's essentially the only relevant dependency here. The change that you noticed is 1% of a float near zero, so I'm pretty surprised that the float comparison filter didn't let this one slide.
I suspect this is the difference: https://numpy.org/devdocs/release/2.0.0-notes.html#numpy-fft-support-for-different-precisions-and-in-place-calculations
Thanks for the info; very useful!
What is the correct behavior here for this algorithm then? Is data precision good enough (I think the test data is stored as float32
in FITS) or should the algorithm up-cast everything to float64
right off the bat?
Hmmm. My position is that the user should decide what precision is sufficient, and if the data are given in 32, the result should be in 32.
Would you like a PR with an update to this docstring?
In that case, my plan is to lock the doctest of this particular page to numpy<2
(so it will be skipped in devdeps) and open up a follow-up issue to unpin that in the future after numpy 2.0 is released. I can do that when I have time. Thanks for your inputs!
Was not a problem a few days ago and there has been no code change here since, so must be some incompatibility with unreleased upstream dependency. My bet is on numpy
2.0.dev
.Example log: https://github.com/spacetelescope/synphot_refactor/actions/runs/7867887899/job/21464235574
https://synphot.readthedocs.io/en/latest/synphot/filter_par.html#generating-fft
https://github.com/spacetelescope/synphot_refactor/blob/master/docs/synphot/filter_par.rst