added a workaround for the data/image buffer split

This commit is contained in:
2022-03-02 15:20:01 +01:00
parent fb633b9bfd
commit 48fa00af4b

View File

@ -65,7 +65,13 @@ end = start + timedelta(seconds=1)
ib_chans = ["sf-imagebuffer/" + i for i in fpics] #TODO does this speed this up?
aggregation = dapi.Aggregation(aggregation_type="value", aggregations=["sum"], nr_of_bins=1)
with DisabledLogger():
ib_data = dapi.get_data(channels=ib_chans, start=start, end=end, aggregation=aggregation)
try:
base_url = "https://data-api.psi.ch/sf-imagebuffer" # needed due to data/image buffer split (Jan 2022)
print("\nCheck with Simon to get the image buffer channel search fixed!\n")
ib_data = dapi.get_data(channels=ib_chans, start=start, end=end, aggregation=aggregation, base_url=base_url)
except RuntimeError as e:
print("dapi got", e)
ib_data = {}
def get_state(f):
try: