Skip to content

Commit

Permalink
Only perturb observations once
Browse files Browse the repository at this point in the history
No need to perturb per parameter batch
  • Loading branch information
dafeda committed Dec 14, 2023
1 parent f3063c4 commit 174f548
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ert/analysis/_es_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@ def analysis_ES(
# Pre-calculate cov_YY
cov_YY = np.cov(S)

D = smoother_adaptive_es.perturb_observations(
ensemble_size=ensemble_size, alpha=1.0
)

else:
# Compute transition matrix so that
# X_posterior = X_prior @ T
Expand Down Expand Up @@ -576,9 +580,6 @@ def analysis_ES(

for param_batch_idx in TimedIterator(batches, progress_callback):
X_local = temp_storage[param_group.name][param_batch_idx, :]
D = smoother_adaptive_es.perturb_observations(
ensemble_size=ensemble_size, alpha=1.0
)
temp_storage[param_group.name][
param_batch_idx, :
] = smoother_adaptive_es.assimilate(
Expand Down

0 comments on commit 174f548

Please sign in to comment.