Closed StuartLittlefair closed 3 weeks ago
Thanks for pinpointing what broke this - should be a simple fix, I'll get it in before the next release (hopefully in the next week or so).
Amazing service @rosteen , thanks!
My simple fix ran into an error in astropy
, still trying to figure out if that's a problem with my fix or a bug in astropy
.
Oops! Let me know if I can help in any way.
Due to changes added in https://github.com/astropy/specutils/pull/1121, the SplineInterpolatedResampler is no longer suitable for binning a spectrum onto a spectral axis which is uniform in velocity space. Prior to this, the following code would work (e.g works in 1.12.0 but not in 1.17.0):
This now fails because the line below
https://github.com/astropy/specutils/blob/a859dd6c9b540b6f651a3b0d882be6b418aecde7/specutils/manipulation/resample.py#L465
assumes that the bin edges and the
fin_spec_axis
are both in wavelength units. The only resampler that works for this use case is the LinearInterpolatedResampler, but this is not accurate enough for velocity binning.