diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-15 17:33:17 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-15 17:33:17 -0500 |
commit | 19f0f19250a9f43c5ed93a5d688d91f600ad9aeb (patch) | |
tree | ff972857bc29fabe5291de20c94abf120843c05c | |
parent | 37717017ad9e9c69ae9e72dfdc6676be49591010 (diff) | |
download | qolab-19f0f19250a9f43c5ed93a5d688d91f600ad9aeb.tar.gz qolab-19f0f19250a9f43c5ed93a5d688d91f600ad9aeb.zip |
working prototype of the logger
-rw-r--r-- | examples/lock_eit.py | 9 |
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) |