This commit is contained in:
2024-06-10 10:44:16 +02:00
parent 9256184430
commit 3093557c99
79 changed files with 2747 additions and 189 deletions
+22
View File
@@ -0,0 +1,22 @@
baseurl = "https://data-api.psi.ch/sf"
filename = "/Users/gobbo_a/dev/back/test.h5"
channels = ["SARFE10-PSSS059:FIT-COM", "S10BC01-DBPM010:Q1"]
start = "2023-12-10T08:50:00.000Z" #args.start.astimezone(pytz.timezone('UTC')).strftime("%Y-%m-%dT%H:%M:%S.%fZ") # isoformat() # "2019-12-13T09:00:00.000000000Z"
end = "2023-12-10T08:50:05.000Z" # args.end.astimezone(pytz.timezone('UTC')).strftime("%Y-%m-%dT%H:%M:%S.%fZ") # .isoformat() # "2019-12-13T09:00:00.100000000Z"
api = DataAPI(baseurl)
ret = api.queryData(channels, start, end)
print ret
channel_data = ret[0]["data"]
y1=[v["value"] for v in channel_data]
x1=[v["globalSeconds"] for v in channel_data]
channel_data = ret[1]["data"]
y2=[v["value"] for v in channel_data]
x2=[v["globalSeconds"] for v in channel_data]
plot([y1, y2], channels, xdata=[x1, x2])