Files
sf-op/script/test/DataAPI.py
2026-02-09 15:06:52 +01:00

12 lines
506 B
Python

import ch.psi.pshell.utils.DataAPI as DataAPI
#da = DataAPI("https://data-api.psi.ch/sf")
da = DataAPI("https://data-api.psi.ch/sf-databuffer")
ret = da.queryData(["S10BC01-DBLM065:B1_LOSS"], 23251652441, 23251653739)
plot([d['value'] for d in ret[0]['data']], xdata=[d['pulseId'] for d in ret[0]['data']])
ret = da.queryData(["S10BC01-DBLM065:B1_LOSS"], "2025-01-21T16:06:00.000", "2025-01-21T16:06:02.000")
plot([d['value'] for d in ret[0]['data']], xdata=[d['pulseId'] for d in ret[0]['data']])