Spectrum1D convenience method to resample
- Dominant language
- Python
- Stars
- 204
- Forks
- 135
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
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):
```python
>>> 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
```
Contributor guide
Research direction
Start with the resampling section of the manipulation documentation and the existing Spectrum1D API. Determine how a convenience method could expose the documented resampling behavior on an existing object; done should cover the proposed scalar and array wavelength inputs and the linear_interpolation sampler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100