Skip to content

Spectrum1D convenience method to resample #1000

@pllim

Description

@pllim

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions