You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spectrum1D.with_spectral_unit seems create a copy of the Spectrum1D object with meta-data storing the original unit and with a newly created WCS from the original spectral_axis (so would overwrite any original WCS if it had been provided), but does not actually change units.
That sure looks like a bug to me... sp_wsu = sp.with_spectral_unit(u.um) should definitely give a spectrum with um units.
@rosteen pointed out out-of-band that this may be a relic of the switch to the APE14 API.
One other thing, though, part of the confusion might be this method's name: with_spectral_unit could mean "spectral axis units" or it could mean "spectral units as in the units one traditionally uses for flux" (also intertwines a bit with #890). So it might be that fixing this provides an excuse to rename to with_spectral_axis_unit? I.e. rename this method to with_spectral_axis_unit, but leave a with_spectral_unit which calls with_spectral_axis_unit but yields a DeprecationWarning?
Spectrum1D.with_spectral_unit
seems create a copy of theSpectrum1D
object with meta-data storing the original unit and with a newly created WCS from the originalspectral_axis
(so would overwrite any original WCS if it had been provided), but does not actually change units.The text was updated successfully, but these errors were encountered: