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
templSpectrumTemplate

Template to split.

wavelength_range[float, float]

Limit the splines to this wavelength range

Rsplinefloat

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

logbool

Log-spaced splines

Returns
stempdict

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