From bc3f403548ba88fe09955eceb79c35948e96c349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Lind-Johansen?= <47847084+lindjoha@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:05:02 +0100 Subject: [PATCH] No Active Rfts error message (#1304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Øyvind Lind-Johansen --- .../plugins/_rft_plotter/_utils/_rft_plotter_data_model.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py b/webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py index 53e6c4b3d..8faa1373f 100644 --- a/webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py +++ b/webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py @@ -116,6 +116,9 @@ def __init__( self.ertdatadf_inactive = filter_frame(self.ertdatadf, {"ACTIVE": 0}) self.ertdatadf = filter_frame(self.ertdatadf, {"ACTIVE": 1}) + if self.ertdatadf.empty: + raise ValueError("There are no active RFT points in the input data.") + self.ertdatadf["STDDEV"] = self.ertdatadf.groupby( ["WELL", "DATE", "ZONE", "ENSEMBLE", "TVD"] )["SIMULATED"].transform("std")