-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Spline1D to modeling #7522
Comments
The |
FYI, @chris-simpson has used the spline fitting from At a glance, it looks like it might be feasible to split that |
See also #11634. |
This has been in since #11634 |
I notice there's no spline-based model in
astropy.modeling.models
. To give a specific use case, in some of thespecutils
planned functions one might want to use a spline as a continuum model. But if that machinery uses astropy models to do the fitting, it's not possible to say "use a spline as the continuum". So that suggests that at least a 1D spline model should be an option.The catch here is that splines are a rather strange kind of model as far as the
modeling
API is concerned. You can't really initialize them without data (although they could be initialized as just all-0s), and the parameter list is rather confusing because there's several parameters per-knot, and they aren't really exposed that way inscipy
'sUnivariateSpline
(probably the most natural underlying implementation). Additionally, you really want to always use them with a custom fitter, given that spline-optimized fitters are far more performant than any generic fitter would be. So a new fitter would also need to be implemented and users would have to know they should use that fitter if the model is a spline.None of those are necessarily roadblocks, though. Personally I think the functionality is worth it... But I'd be interested what @nden @perrygreenfield @astrofrog, or any others might think?
The text was updated successfully, but these errors were encountered: