diff options
Diffstat (limited to 'examples/lock_eit.py')
-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) |