aboutsummaryrefslogtreecommitdiff
path: root/examples/lock_eit.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-15 17:33:17 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-15 17:33:17 -0500
commit19f0f19250a9f43c5ed93a5d688d91f600ad9aeb (patch)
treeff972857bc29fabe5291de20c94abf120843c05c /examples/lock_eit.py
parent37717017ad9e9c69ae9e72dfdc6676be49591010 (diff)
downloadqolab-19f0f19250a9f43c5ed93a5d688d91f600ad9aeb.tar.gz
qolab-19f0f19250a9f43c5ed93a5d688d91f600ad9aeb.zip
working prototype of the logger
Diffstat (limited to 'examples/lock_eit.py')
-rw-r--r--examples/lock_eit.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py
index f61e189..6a2a3ba 100644
--- a/examples/lock_eit.py
+++ b/examples/lock_eit.py
@@ -74,20 +74,19 @@ def adjustRFandLog(apparatus):
def updateLogPlot(apparatus):
log = apparatus.log
f = plt.figure()
- # plt.clf()
log.plot()
log_chart.set_figure(f)
plt.close(f)
- # plt.pause(.0001)
- # jp.Matplotlib(a=wp)
print(f're-plotting')
+ st.text=f're-plotting {time.time()}'
+ jp.run_task(wp.update())
async def updateLogPlotLoop(apparatus):
while True:
updateLogPlot(apparatus)
if not apparatus.runStatus:
break
- await asyncio.sleep(1)
+ await asyncio.sleep(5)
def updateLogFile(apparatus):
log = apparatus.log
@@ -96,6 +95,7 @@ def updateLogFile(apparatus):
log.save(logFileName, item_format='.15e')
print(f'Saving to {logFileName}')
+
async def updateLogFileLoop(apparatus):
while True:
updateLogFile(apparatus)
@@ -180,6 +180,7 @@ if __name__ == '__main__':
plt.close(f)
# mpl.use("TkAgg")
# apparatus = asyncio.run(main())
+ st = jp.Div(test='Status string', a=wp)
jp.justpy(getPage, startup=jp_startup)