added set_data to lib

This commit is contained in:
2026-06-03 12:40:57 +02:00
parent 5c53e20e53
commit 327d7b7ef4
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -41,6 +41,11 @@ class ArcticLibrary:
return df
def set_data(self, symbol, df):
df.index = df.index.view("datetime64[ns]") # adb supports update only for timeseries indexes
self.lib.update(symbol, df)
def has_index(self, symbol, index):
index = encode_index(index)
+3 -3
View File
@@ -85,11 +85,11 @@ def update_adb(evt):
col_id = evt.args["colId"]
new_val = evt.args["newValue"]
index = pd.Timestamp(int(row_id)) # adb supports update only for timeseries indexes
index = int(row_id)
lib = adb.get(beamline)
df = lib.read(pgroup, date_range=[index]).data
df = lib.get_data(pgroup, index)
df.at[index, col_id] = new_val
lib.update(pgroup, df)
lib.set_data(pgroup, df)
def update_grids(evt):