sandy.gls module
This module contains all classes and functions specific for processing GLS and assessment of adjustment. It handles only numpy.ndarray.
- sandy.gls.chi_diag(x_prior, S, Vx_prior, Vy_extra, y_extra)
Function to calculate diagonal chi-value $chi_{ind,i}$>>1 according to https://www.oecd-nea.org/jcms/pl_19760/intermediate-report-on-methods-and-approaches-to-provide-feedback-from-nuclear-and-covariance-data-adjustment-for-improvement-of-nuclear-data-files (page 9, equation (4.3))
- Parameters:
- x_prior: 1D iterable
Vector in which we are going to apply GLS (M,)
- S2D iterable
2D sensitivity of the model y=f(x) (M, N).
- Vx_prior2D iterable
2D covariance matrix of x_prior (M, N).
- Vy_extra2D iterable
2D covariance matrix for y_extra (M, N).
- y_extra1D iterable
1D extra info on output (N,)
- Returns:
- numpy.ndarray
diagonal chi-value
- Results:
- chi diagonal >> 1
Inconsistency may exist between |y_extra - y_calc| and covariance matrix, S*Vx_prior*S.T, and Vy_extra.
- sandy.gls.chi_individual(x_prior, S, Vx_prior, Vy_extra, y_extra)
Function to calculate individual chi-value measured in sigmas according to https://www.oecd-nea.org/jcms/pl_19760/intermediate-report-on-methods-and-approaches-to-provide-feedback-from-nuclear-and-covariance-data-adjustment-for-improvement-of-nuclear-data-files (page 9, equation (4.2))
- Parameters:
- x_prior: 1D iterable
Vector in which we are going to apply GLS (M,)
- S2D iterable
2D sensitivity of the model y=f(x) (M, N).
- Vx_prior2D iterable
2D covariance matrix of x_prior (M, N).
- Vy_extra2D iterable
2D covariance matrix for y_extra (M, N).
- y_extra1D iterable
1D extra info on output (N,).
- Returns:
- numpy.ndarray
individual chi-value measured in sigmas.
- Results:
- chi individual >> 1
Inconsistency may exist between |y_extra - y_calc| and covariance matrix, S*Vx_prior*S.T, and Vy_extra.
- sandy.gls.chi_square(x_prior, S, Vx_prior, Vy_extra, y_extra, N_e)
Function to calculate contribution to chi-square value according to https://www.oecd-nea.org/jcms/pl_19760/intermediate-report-on-methods-and-approaches-to-provide-feedback-from-nuclear-and-covariance-data-adjustment-for-improvement-of-nuclear-data-files (page 10, equation (4.4))
- Parameters:
- x_prior: 1D iterable
Vector in which we are going to apply GLS (M,)
- S2D iterable
2D sensitivity of the model y=f(x) (M, N).
- Vx_prior2D iterable
2D covariance matrix of x_prior (M, N).
- Vy_extra2D iterable
2D covariance matrix for y_extra (M, N).
- y_extra1D iterable
1D extra info on output (N,)
- N_eint
Number of experimental values used in adjustment.
- Returns:
- numpy.ndarray
contribution to chi-square value
- Results:
- chi square < 0
The experiment is very effective in the adjustment.
- sandy.gls.gls_update(x_prior, S, Vx_prior, y_extra, Vy_extra=None)
Perform the GlS update of a prior vector and its related covariance matrix, according with https://www.tandfonline.com/action/journalInformation?journalCode=tnst2 .. math:
$$ x_{post} = x_{prior} + V_{x_{prior}}\cdot S^T \cdot \left(S\cdot V_{x_{prior}}\cdot S^T + V_{y_{extra}}
ight)^{-1} cdot left(y_{extra} - y_{calc} ight)
V_{x_{post}} = V_{x_{prior}} - V_{x_{prior}}cdot S^T cdot left(Scdot V_{x_{prior}}cdot S^T + V_{y_{extra}}
- ight)^{-1} cdot S cdot V_{x_{prior}}
$$
- Parameters:
- x_prior1D iterable
Vector to be updated (N,)
- S2D or 1D iterable
Sensitivity matrix (M, N) or sensitivity vector(N,)
- Vx_prior2D iterable
2D covariance matrix of x_prior (N, N)
- y_extra1D iterable
1D extra info on output (M,)
- Vy_extra2D iterable or sigle element 1D iterable, optional, default is None
covariance matrix with the uncertainties of the extra information, (M, M) or (1,).
- Returns:
- numpy.ndarray
updated vector adjusted with the GLS technique
- numpy.ndarray
updated covariance matrix adjusted with the GLS technique
Notes
Note
If Vy_extra=None the constraint GLS update technique
will be performed
- sandy.gls.ishikawa_factor(S, Vx_prior, Vy_extra)
Function to obtain Ishikawa factor according to https://www.oecd-nea.org/jcms/pl_19760/intermediate-report-on-methods-and-approaches-to-provide-feedback-from-nuclear-and-covariance-data-adjustment-for-improvement-of-nuclear-data-files (page 10, equation (4.5))
- Parameters:
- S2D iterable
2D sensitivity of the model y=f(x) (M, N).
- Vx_prior2D iterable
2D covariance matrix of x_prior (M, N).
- Vy_extra2D iterable
2D covariance matrix for y_extra (M, N).
- Returns:
- numpy.ndarray
Ishikawa factor.
- Results:
- Ishikawa factor << 1
The extra data is not so useful and the data remain unchanged.
- Ishikawa factor >> 1
The extra data very useful and the ‘posteriori’ covariance will be reduced to the same level as the integral parameter covariance.
- Ishikawa factor ~ 1
The experiment is useful and the ‘posteriori’ covariance will be reduced by approximately half