simonsobs / sodetlib

Tools for performing core instrument testing, quality control, and analysis tasks.
BSD 2-Clause "Simplified" License
5 stars 0 forks source link

move bias_step init_current_mode outside of try statement #426

Closed jlashner closed 4 months ago

jlashner commented 4 months ago

This moves the init_current_mode function outside of the try statement. This is a function to get the initial state of the current-mode, so we can recover. If this statement fails, since we haven't yet changed state, we don't need to run the finally block that recovers the initial state, so we don't need it inside of the try block.

Currently there are some instances where this function fails, and then the state-recovery fails since init_current_mode is not defined, such as in this discussion.