[AstroPy] Recovering and interpolating contents of a Spectrum1D spectrum
Peter Dzwig
pdzwig at summaventures.com
Sat Jun 13 07:45:07 EDT 2020
All,
I have to work with a Spectrum1D object, spectrum, which I have
"inherited" (think of it as legacy-ware):
spectrum = Spectrum1D(spectral_axis= wavelength, flux=field_strength)
I need to recover the wavelengths and field_strength to standard numpy
arrays because I need to interpolate between the points in the available
(probably less than first-class) dataset. It would be great if I could
do the interpolation within Spectrum1D but as far as I can see
specutils doesn't provide a tool to do so.
Hence, I have to extract the data - and subsequently create a new
Spectrum1D object containing the interpolated data.
I know what the units are already, so am not concerned about preserving
units while extracting the datapoints.
Many thanks for any suggestions.
--
Dr. Peter Dzwig
More information about the AstroPy
mailing list