barak.fitcont.spline_continuum¶
- barak.fitcont.spline_continuum(wa, fl, er, edges, minfrac=0.01, nsig=3.0, resid_std=1.3, debug=False)[source]¶
Given a section of spectrum, fit a continuum to it very loosely based on the method in Aguirre et al. 2002.
Parameters : wa : Wavelengths.
fl : Fluxes.
er : One sigma errors.
edges : Wavelengths giving the chunk edges.
minfrac = 0.01 : At least this fraction of pixels in a single chunk
contributes to the fit.
nsig = 3.0 : No. of sigma for rejection for clipping.
resid_std = 1.3 : Maximum residual st. dev. in a given chunk.
debug = False : If True, make helpful plots.
Returns : Continuum array and spline points :