From acefef02f62710826276b0e6ddc95055769399d2 Mon Sep 17 00:00:00 2001 From: Asgeir Nyvoll Date: Wed, 24 May 2023 14:13:12 +0200 Subject: [PATCH] Keep non-log parameters --- CHANGELOG.md | 2 ++ webviz_subsurface/_models/parameter_model.py | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f338cbb5..33ddd675f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [#1217](https://github.com/equinor/webviz-subsurface/pull/1217) - New plugin `SimulationTimeSeriesOneByOne`, meant to replace the old `ReservoirSimulationTimeSeriesOneByOne`. Uses the `.arrow` summary provider and is implemented with WLF (Webviz Layout Framework). +### Fixed +- [#1222](https://github.com/equinor/webviz-subsurface/pull/1222) - Keep both non-logarithmic parameters. ## [0.2.19] - 2023-05-05 diff --git a/webviz_subsurface/_models/parameter_model.py b/webviz_subsurface/_models/parameter_model.py index 167fa0d0e..ed607074c 100644 --- a/webviz_subsurface/_models/parameter_model.py +++ b/webviz_subsurface/_models/parameter_model.py @@ -93,8 +93,7 @@ def _prepare_data( """ Different data preparations on the parameters, before storing them as an attribute. Option to drop parameters with constant values. Prefixes on parameters from GEN_KW - are removed, in addition parameters with LOG distribution will be kept while the - other is dropped. + are removed. """ # Remove parameters with only NaN (can happen for filtered dataframes) @@ -111,9 +110,7 @@ def _prepare_data( # Keep only LOG parameters log_params = [param for param in self._dataframe if param.startswith("LOG10_")] - self._dataframe = self._dataframe.drop( - columns=[param.replace("LOG10_", "") for param in log_params] - ) + self._dataframe = self._dataframe.rename( columns={col: f"{col} (log)" for col in log_params} )