astropy / astropy/specutils

Improve spline resampling to use any degree spline fit

Open
#492 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

We now have a spline resample implemented in specutils, but it's only a cubicspline. There is a good scipy function for doing a spline fit of 5 or less degrees (`scipy.interpolate.UnivariateSpline`), but, it cannot handle the "edges" of the fit by filling with NaNs without some extra helper code. `CubicSpline` however, has built in NaN filling. For time reasons, since the current implemented default fill is NaN, we're using `CubicSpline`.

Once #489 is done, we should change this out accordingly.

Contributor guide

Open the contributing guide

Research direction

Read the existing spline resampling implementation in specutils and review #489 first. Replace the cubic-only fit with scipy.interpolate.UnivariateSpline for degrees up to five while preserving NaN filling at the fit edges; done means the resampling supports those degrees and retains the current default behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.