Corrections to the Hessian can happen after the assimilation has returned a value and has calculated the approximation to the Hessian, broadly speaking after every band has been processed, or before the following line
The function to calculate the correction term will calculate for a single band the Hessian from the emulator (gp.hessian(x)) which yields H'' (a 4x4 matrix). The other term is just innovation divided by the per-band variance, which is a scalar. The other ingredients are
- The analysis state
x_analysis
- The per pixel uncertainty
- The innovations (check that they're defined in the right order eg H(x) -y )
Easiest thing is to use the cached_obs structure, which is a n_bands list where each element contains:
- observations
- R_mat (uncertainty matrix) (needed)
- Mask (needed)
- Metadata
- Emulator (needed)
Innovations come from innovations_prime (but you might just want to either change their definition, or just put a - in front)
Corrections to the Hessian can happen after the assimilation has returned a value and has calculated the approximation to the Hessian, broadly speaking after every band has been processed, or before the following line
KaFKA/kafka/linear_kf.py
Line 271 in 81c97a1
The function to calculate the correction term will calculate for a single band the Hessian from the emulator (
gp.hessian(x)) which yields H'' (a 4x4 matrix). The other term is just innovation divided by the per-band variance, which is a scalar. The other ingredients arex_analysisEasiest thing is to use the
cached_obsstructure, which is an_bandslist where each element contains:Innovations come from
innovations_prime(but you might just want to either change their definition, or just put a-in front)