import ch.psi.utils.DataAPI as DataAPI

da = DataAPI("https://data-api.psi.ch/sf")

ret = da.queryData(["S10BC01-DBLM065:B1_LOSS"], 8291491519L, 8291491619L)
plot([d['value']  for d in ret[0]['data']])
ret = da.queryData(["S10BC01-DBLM065:B1_LOSS"], "2019-04-03T10:00:00.000", "2019-04-03T10:00:02.000")
plot([d['value']  for d in ret[0]['data']])
ret = da.queryData(["S10BC01-DBLM065:B1_LOSS", "S10BC01-DBLM065:LOSS_SIGNAL_RAW"], 8291491519L, 8291491559L)
plot(ret[1]['data'][0]['value'])
plot([d['value']  for d in ret[1]['data']])
