aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-20 23:22:41 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-20 23:22:41 -0500
commitba557369ac09888cbebe63a7a07ef7c660b6853e (patch)
tree20ccdc76e492f8966944a4821e4d287113c33fa7 /examples
parented7fb4517757e4f2c86269dc330faad6843eb63c (diff)
downloadqolab-ba557369ac09888cbebe63a7a07ef7c660b6853e.tar.gz
qolab-ba557369ac09888cbebe63a7a07ef7c660b6853e.zip
back to long lock run
Diffstat (limited to 'examples')
-rw-r--r--examples/lock_eit.py37
1 files changed, 22 insertions, 15 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py
index bca68e1..db32e3b 100644
--- a/examples/lock_eit.py
+++ b/examples/lock_eit.py
@@ -156,18 +156,17 @@ async def main():
apparatus.state = None
apparatus.runStatus = False
- d=getConfig(apparatus)
- instruments_config=gui.QOLDictionary(a=wp, name='Instruments configs', container=d)
-
SweepSpan = 10000
ai['rfgen'].stopFrequencySweep()
ai['rfgen'].setFreqFixed(freqDeltaM2)
# ai['rfgen'].setFreqFixed(freqZero)
+ ai['rfgen'].setRFAmplitude(3.4)
+ d=getConfig(apparatus)
+ instruments_config=gui.QOLDictionary(a=wp, name='Instruments configs', container=d)
logger.info('========== Initial lock ===========')
- ai['rfgen'].setRFAmplitude(0)
rfPout = ai['rfgen'].getRFAmplitude()
apparatus.state = f'Initial lock RF power {rfPout} dBm'
logger.info(apparatus.state)
@@ -181,17 +180,24 @@ async def main():
logger.info('========= Long term lock ===========')
apparatus.gui_log.setTraces( initLog() )
- 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.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 = 'Done working with hardware'
logger.info(apparatus.state)
@@ -199,6 +205,7 @@ async def main():
apparatus.gui_log.stop_tasks()
task_wp_update_loop.cancel()
logger.info("exiting main loop")
+ update_webpage(apparatus=apparatus)
return(apparatus)
def update_webpage(byWhom=None, apparatus=None):