Turn on, Turn off, and Degauss functionality is now available for single (Magnet/MagnetCollection), multiple (MagnetCollection), and all magnets (MagnetCollection)
We check the available control options on instantiation of the MagnetControlInformation class using magnet.ctrl.get_ctrlvars()['enum_strs'] to grab the potential options for sending to :CTRL PV for that given magnet.
Magnets can have different control options available (i.e. some may not have TURN_ON/TURN_OFF/DEGAUSS) so we have provided a check_options decorator that can be used before calling each of the functions that caput to the :CTRL PV
Tests
Test cases for the new functions have been provided in tests/unit_tests/lcls_tools/common/devices/test_magnet.py
Notes
Part of these changes are associated with a upcoming cleaning task to move all sub-folders of devices into the main common/devices folder.
Changes Summary
Turn on, Turn off, and Degauss functionality is now available for single (Magnet/MagnetCollection), multiple (MagnetCollection), and all magnets (MagnetCollection)
We check the available control options on instantiation of the MagnetControlInformation class using
magnet.ctrl.get_ctrlvars()['enum_strs']
to grab the potential options for sending to:CTRL
PV for that given magnet.Magnets can have different control options available (i.e. some may not have TURN_ON/TURN_OFF/DEGAUSS) so we have provided a
check_options
decorator that can be used before calling each of the functions thatcaput
to the:CTRL
PVTests
tests/unit_tests/lcls_tools/common/devices/test_magnet.py
Notes
Part of these changes are associated with a upcoming cleaning task to move all sub-folders of devices into the main
common/devices
folder.closes #113 closes #114 closes #115