From d3e8b2f6f479938fec5929c70eca7fad9a4c7984 Mon Sep 17 00:00:00 2001 From: "Yngve S. Kristiansen" Date: Tue, 26 Nov 2024 13:59:38 +0100 Subject: [PATCH] fixup! Combine responses across realizations --- src/ert/storage/local_ensemble.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ert/storage/local_ensemble.py b/src/ert/storage/local_ensemble.py index 6e3241daa3b..38a3cd8395d 100644 --- a/src/ert/storage/local_ensemble.py +++ b/src/ert/storage/local_ensemble.py @@ -733,7 +733,14 @@ def load_responses(self, key: str, realizations: Tuple[int]) -> polars.DataFrame combined_df_path = self.mount_point / f"{response_type}.parquet" if combined_df_path.exists(): combined_df = polars.read_parquet(combined_df_path) - return combined_df.filter(polars.col("realization").is_in(realizations)) + combined_df = combined_df.filter( + polars.col("realization").is_in(realizations) + ) + + if select_key: + combined_df = combined_df.filter(polars.col("response_key") == key) + + return combined_df loaded = [] for realization in realizations: