From 52e5024a7180dde40def46f06b7e99ab5f71e779 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 3 Jun 2026 20:21:59 +0200 Subject: [PATCH] added update_cell --- stand/adb.py | 6 ++++++ stand/table.py | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/stand/adb.py b/stand/adb.py index adffcf6..066d61e 100644 --- a/stand/adb.py +++ b/stand/adb.py @@ -28,6 +28,12 @@ class ArcticLibrary: return getattr(self.lib, name) + def update_cell(self, symbol, index, column, value): + df = self.get_data(symbol, index) + df.at[index, column] = value + self.set_data(symbol, df) + + def get_data(self, symbol, index=None): if index is not None: index = encode_index(index) diff --git a/stand/table.py b/stand/table.py index 171ff4b..ba79b96 100644 --- a/stand/table.py +++ b/stand/table.py @@ -85,10 +85,7 @@ def update_adb(evt): new_val = evt.args["newValue"] row_id = int(row_id) - lib = adb.get(beamline) - df = lib.get_data(pgroup, row_id) - df.at[row_id, col_id] = new_val - lib.set_data(pgroup, df) + adb.get(beamline).update_cell(pgroup, row_id, col_id, new_val) def update_grids(evt):