d2chi2_element(data,
back_calc_vals,
back_calc_grad_j,
back_calc_grad_k,
back_calc_hess_jk,
errors)
| source code
|
Calculate the chi-squared Hessian element {j, k}.
The chi-squared Hessian
The equation is:
_n_
d2chi^2(theta) \ 1 / dyi(theta) dyi(theta) d2yi(theta) \
--------------- = 2 > ---------- | ---------- . ---------- - (yi-yi(theta)) . --------------- |
dthetaj.dthetak /__ sigma_i**2 \ dthetaj dthetak dthetaj.dthetak /
i=1
where
-
i is the index over data sets.
-
j is the parameter index for the first dimension of the Hessian.
-
k is the parameter index for the second dimension of the Hessian.
-
theta is the parameter vector.
-
yi are the values of the measured data set.
-
yi(theta) are the values of the back calculated data set.
-
dyi(theta)/dthetaj are the values of the back calculated gradient
for parameter j.
-
d2yi(theta)/dthetaj.dthetak are the values of the back calculated
Hessian for the parameters j and k.
-
sigma_i are the values of the error set.
- Parameters:
data (numpy rank-1 size N array) - The vector of yi values.
back_calc_vals (numpy rank-1 size N array) - The vector of yi(theta) values.
back_calc_grad_j (numpy rank-1 size N array) - The vector of dyi(theta)/dthetaj values for parameter j.
back_calc_grad_k (numpy rank-1 size N array) - The vector of dyi(theta)/dthetak values for parameter k.
back_calc_hess_jk (numpy rank-1 size N array) - The vector of d2yi(theta)/dthetaj.dthetak values at {j, k}.
errors (numpy rank-1 size N array) - The vector of sigma_i values.
- Returns: float
- The chi-squared Hessian element {j,k}.
|