diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-22 17:51:12 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-22 17:51:12 -0500 |
commit | d90dca4ce0c7cfb69000f00348c5a5dc4f577065 (patch) | |
tree | 885a79831d98a2048ff214f80ff9fa25222c0a36 /examples/lock_eit.py | |
parent | d0833b099322c57a05ca999f34c3afcd36ebc312 (diff) | |
download | qolab-d90dca4ce0c7cfb69000f00348c5a5dc4f577065.tar.gz qolab-d90dca4ce0c7cfb69000f00348c5a5dc4f577065.zip |
better code structure
Diffstat (limited to 'examples/lock_eit.py')
-rw-r--r-- | examples/lock_eit.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py index 4fcadfa..8d868f3 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -165,7 +165,7 @@ async def main(): rfPstop = 10 rfPowerList = np.linspace(rfPstart, rfPstop, 11) rfPower0 = rfPstart - rfPower0 = 9 + rfPower0 = 3.4 ai['rfgen'].setRFAmplitude(rfPower0) d=getConfig(apparatus) @@ -188,7 +188,7 @@ async def main(): apparatus.state = f'Calibrating lockin response at RF power {rfPout} dBm' logger.info(apparatus.state) update_webpage(apparatus=apparatus) - ai['pid'].setEnable(True) + ai['pid'].setEnable(False) ai['pid'].reset() apparatus.gui_log.setTraces( initLog() ) res = await asyncio.gather( @@ -203,6 +203,7 @@ async def main(): res = await asyncio.gather( feedbackLoop(apparatus, nsteps=20) ) + ai['rfgen'].setFreqFixed(fr0) log = apparatus.gui_log.traces trE=log.getTrace('error') @@ -221,10 +222,12 @@ async def main(): logger.info('========= Long term lock ===========') apparatus.gui_log.setTraces( initLog() ) + apparatus.gui_log.traces.config['tags']['lockin_slope']=float(lockin_slope) apparatus.runStatus = True async def longTermLock(): apparatus.state = f'Long term lock RF power {rfPout} dBm' + ai['pid'].setEnable(True) logger.info(apparatus.state) update_webpage(apparatus=apparatus) res = await asyncio.gather( @@ -234,6 +237,7 @@ async def main(): async def sweepRFPower(): # for p in np.linspace(-10,10, 110): + ai['pid'].setEnable(True) for p in rfPowerList: ai['rfgen'].setRFAmplitude(p) rfPout = ai['rfgen'].getRFAmplitude() |