From 3af263e503dea0c7f5a257edf5096af09ea54263 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 26 Dec 2021 18:26:22 -0500 Subject: added some draft of tsdb logging --- examples/lock_eit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 16f320f..7efa8d6 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -8,6 +8,8 @@ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt +# import universal_tsdb as utsdb +import qolab.tsdb as tsdb import asyncio import time @@ -118,6 +120,9 @@ dfB = freqDeltaMp2 - freqZero freqDeltaMm2 = freqZero - dfB; async def main(): + tsdb_client = tsdb.Client('influx', 'http://lumus.phusics.wm.edu:8428', database='qolab') + tsdb_ingester = tsdb.Ingester(tsdb_client, batch=11, measurement_prefix='VAMPIRE.HighPower') + task_wp_update_loop = asyncio.create_task(update_webpage_loop(update_interval=1)) apparatus.config['Device type'] = 'QOL VAMPIRE HighPower magnetometer' apparatus.config['Device model'] = 'v0.1' @@ -142,7 +147,7 @@ async def main(): # print('------ Header ends -------------') # ch1 = scope.getTrace(1) # traces = scope.getAllTraces() - # pid = PID(100,400,0, sign=-1); # goom for dm=-2 resonance + # pid = PID(100,400,0, sign=-1); # good for dm=-2 resonance pid = PID(50,200,0, sign=-1) apparatus.instruments={} -- cgit v1.2.3