-
-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Labels
Description
Basically https://specutils.readthedocs.io/en/stable/manipulation.html#resampling on existing Spectrum1D object without having to do all the extra steps in manipulation
separately and then create a new Spectrum1D object.
Possible API (not saying this is the best but to show you more what I mean):
>>> from astropy import units as u
>>> from specutils import Spectrum1D
>>> sp = Spectrum1D(spectral_axis=[1000, 2000] * u.AA, flux=[1, 2] * u.nJy)
>>> sp.sample(1500 * u.AA, sampler='linear_interpolation') # Input wavelength can also be array
<Quantity 1.5 nJy>