From c7fd8e176c33f11c607821e1df0b003b34deb7ef Mon Sep 17 00:00:00 2001 From: Stefano Serafin <serafin@jet02.img.univie.ac.at> Date: Thu, 18 Jul 2024 10:43:18 +0200 Subject: [PATCH] added a way to simulate error growth between analyses --- ENDA.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ENDA.py b/ENDA.py index d3074a7..17368f2 100644 --- a/ENDA.py +++ b/ENDA.py @@ -342,8 +342,16 @@ class cycle: xbp = x0.T-xbm x0 = (xbm+xbp*(1.+inflation_factor)).T - # Store posterior and save initial conditions for next cycle + # Store posterior analyses[k,:,:] = x0 + + # If you want to add/simulate some error growth in the next cycle, + # perturb the state here. + if isinstance(nr,CBL): + if cbl_settings["simulate_error_growth"]: + x0[:-cbl_settings["parameter_number"],:] += np.random.normal(scale=cbl_settings["error_growth_perturbations_amplitude"],size=nens)[None,:] + + # Save initial conditions for next cycle da.update(x0) # Store the output -- GitLab