epraya.Selectvarian#
- Selectvarian(J, redchi2, ztol=None, minw=0.3)#
Calculates the variance of the fit using the Jacobian matrix of the residuals. IT discart values where the variance cannot be calculated because it derivative is null or is lost in the numerical approximation, keeping the other ones.
The variance calculated in all cases is not conditional, to ensure its validity.
- Parameters:
J (np.array) – Jacobian matrix of residuals.
redchi2 (float) – Chi square for the calculation of the variance.
ztol (float) – Reference value for parameter discart (column of the jacobian) if the variance cannot be calculated.
minw (float) – Reference value for the weight (influence) of one parameter in the calculation of variance. If the weight is higher, the parameter cannot be discarted without affecting the variance validity.
- Returns:
variance (np.array) – Matrix of covariance of the fit.
perr (np.array) – Values of the variance of the fitted parameters.
identification (np.array) – Reference of the values that allows the calculation of the variance.