diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-01-05 12:10:39 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-01-05 12:11:12 -0500 |
commit | 0e86f76589d161660d2a8026e9a8314eb8ac47e2 (patch) | |
tree | 368745830fc741e3cdad1e1c512db43e4d49e998 | |
parent | 0599f26a583ef6ecedaea4f7afae6beacbc30403 (diff) | |
download | qolab-0e86f76589d161660d2a8026e9a8314eb8ac47e2.tar.gz qolab-0e86f76589d161660d2a8026e9a8314eb8ac47e2.zip |
assigning measurements inside relevant functions
-rw-r--r-- | examples/lock_eit.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/lock_eit.py b/examples/lock_eit.py index c696b60..010d17e 100644 --- a/examples/lock_eit.py +++ b/examples/lock_eit.py @@ -160,6 +160,7 @@ async def calibratingLockin(apparatus, extra_tags={}): logger.info(f'dE = {dE}') logger.info(f'lockin error signal slope = {slope} V/Hz') + ai['error_signal_response_to_eit_detuning'].conversion_factor = slope return float(slope) @@ -206,6 +207,7 @@ async def responseToChangeOfBfieldControlVoltage(apparatus, extra_tags={}): logger.info(f'df = {df}') logger.info(f'response to magnetic control voltage = {slope} Hz/V') + ai['B_control_voltage_to_eit_detuning'].conversion_factor = slope # relock to default state ai['lockin'].AuxOut1=0 @@ -245,6 +247,8 @@ async def record_magnetometer_noise(apparatus): scope.setConfig(old_config) async def longTermLock(apparatus, extra_tags={}): + ai = apparatus.instruments + rfPout = apparatus.getRFAmplitude() apparatus.state = f'Long term lock RF power {rfPout} dBm' logger.info(apparatus.state) @@ -366,29 +370,23 @@ async def main(): await initial_lock_to_eit(apparatus, extra_tags=extra_tags) lockin_slope= await calibratingLockin(apparatus, extra_tags=extra_tags) - ai['error_signal_response_to_eit_detuning'].conversion_factor = lockin_slope instruments_config.container = getConfig(apparatus) instruments_config.display_container_dictionary() B_response= await responseToChangeOfBfieldControlVoltage(apparatus, extra_tags=extra_tags) - ai['B_control_voltage_to_eit_detuning'].conversion_factor = B_response instruments_config.container = getConfig(apparatus) instruments_config.display_container_dictionary() # await sweepRFPower(apparatus, extra_tags=extra_tags, rfPowerList=rfPowerList) - await record_magnetometer_noise(apparatus) + # await record_magnetometer_noise(apparatus) - apparatus.gui_log.stop_tasks() - task_wp_update_loop.cancel() - logger.info("exiting main loop") - update_webpage(apparatus=apparatus) - return(apparatus) await longTermLock(apparatus, extra_tags=extra_tags) apparatus.state = 'Done working with hardware' logger.info(apparatus.state) + update_webpage(apparatus=apparatus) apparatus.gui_log.stop_tasks() task_wp_update_loop.cancel() |