split_spline_template

grizli.utils.split_spline_template(templ, wavelength_range=[5000, 24000.0], Rspline=10, log=True)[source]

Multiply a single template by spline bases to effectively generate a spline multiplicative correction that can be fit with linear least squares.

Parameters:
templ : SpectrumTemplate

Template to split.

wavelength_range : [float, float]

Limit the splines to this wavelength range

Rspline : float

Effective resolution, R=dlambda/lambda, of the spline correction function.

log : bool

Log-spaced splines

Returns:
stemp : dict

Dictionary of spline-component templates, with additional attributes:

wspline = wavelength of the templates / spline correction tspline = matrix of the spline corrections knots = peak wavelenghts of each spline component