From 4cfd39054b309412565c1060e8ef214e5615d5c2 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 21 Dec 2021 11:00:24 -0500 Subject: added back RF power sweep --- examples/lock_eit.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/lock_eit.py b/examples/lock_eit.py index db32e3b..8d33fdf 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -181,23 +181,23 @@ async def main(): logger.info('========= Long term lock ===========') apparatus.gui_log.setTraces( initLog() ) apparatus.runStatus = True - apparatus.state = f'Long term lock RF power {rfPout} dBm' - logger.info(apparatus.state) - update_webpage(apparatus=apparatus) - res = await asyncio.gather( - feedbackLoop(apparatus, nsteps=100000) - ) - # for p in np.linspace(0,9, 110): - # ai['rfgen'].setRFAmplitude(p) - # rfPout = ai['rfgen'].getRFAmplitude() - # apparatus.state = f'Long term lock RF power {rfPout} dBm' - # logger.info(apparatus.state) - # update_webpage(apparatus=apparatus) - # ai['pid'].reset() - # apparatus.runStatus = True - # res = await asyncio.gather( - # feedbackLoop(apparatus, nsteps=50) - # ) + # apparatus.state = f'Long term lock RF power {rfPout} dBm' + # logger.info(apparatus.state) + # update_webpage(apparatus=apparatus) + # res = await asyncio.gather( + # feedbackLoop(apparatus, nsteps=100000) + # ) + for p in np.linspace(0,9, 110): + ai['rfgen'].setRFAmplitude(p) + rfPout = ai['rfgen'].getRFAmplitude() + apparatus.state = f'Long term lock RF power {rfPout} dBm' + logger.info(apparatus.state) + update_webpage(apparatus=apparatus) + ai['pid'].reset() + apparatus.runStatus = True + res = await asyncio.gather( + feedbackLoop(apparatus, nsteps=50) + ) apparatus.state = 'Done working with hardware' logger.info(apparatus.state) -- cgit v1.2.3