chi2_func

sitelle.fit.chi2_func(axis, spectrum, fit_params, delta=8)

Computes a chi square value only around fitted lines.

axis : 1D ndarray
Axis of the spectrum [cm-1]
spectrum : 1D ndarray
Spectrum on which the fit has been performed
fit_params: dict
fit parameters containing information about the lines (output from an orcs fit, e.g. orcs.core.HDFCube.fit_lines_in_spectrum)
delta : int
Delta in FWHM around line peak that should be used to compute the chi2. Default = 8
Returns:a chi square value, computed only around +- delta * fwhm each line
Return type:float