Tikhonov
- class jwst.extract_1d.soss_extract.atoca_utils.Tikhonov(a_mat, b_vec, t_mat)[source]
Bases:
objectUse Tikhonov regularization to solve the ill-posed problem A.x = b.
The matrix A is accidentally singular or close to singularity. Tikhonov regularization adds a regularization term in the equation and aims to minimize the equation:
||A.x - b||^2 + ||gamma.x||^2
where gamma is the Tikhonov regularization matrix.
- Parameters:
- a_matndarray
Matrix A (2D) in the system to solve
A.x = b- b_vecndarray
Vector b (1D) in the system to solve
A.x = b- t_matndarray
Tikhonov regularization matrix (2D) to be applied on
b_vec
Methods Summary
solve([factor])Solve the Tikhonov regularization problem.
test_factors(factors)Test multiple candidate Tikhonov factors.
Methods Documentation
- solve(factor=1.0)[source]
Solve the Tikhonov regularization problem.
Minimize the equation:
||A.x - b||^2 + ||gamma.x||^2
by solving:
(A_T.A + gamma_T.gamma).x = A_T.b
where gamma is the Tikhonov matrix multiplied by a scale factor.
- Parameters:
- factorfloat, optional
Multiplicative constant of the regularization matrix
- Returns:
- ndarray
Solution of the system (1D)
- test_factors(factors)[source]
Test multiple candidate Tikhonov factors.
- Parameters:
- factorsndarray
1D array of factors to test
- Returns:
TikhoTestsDictionary of test results