Low-level python modules for operating OZ Optics attenuators
- DD-100-MC (RS232)
- DD-600-MC (RS232)
- Connect to OZ Optics attenuators over serial through a terminal server
- Query attenuator state and parameters
- Command full range of attenuation values
- Install base class from https://github.com/COO-Utilities/hardware_device_base
pip install .import dd100mc
controller = dd100mc.OZController()
controller.connect(host='192.168.29.153', port=10003)
controller.set_attenuation(36.5)
print(controller.get_attenuation())
controller.set_position(5750)
print(controller.get_position())
# For a comprehensive list of classes and methods, use the help function
help(dd100mc)Unit tests are located in tests/ directory.
To run all tests from the project root:
python -m pytest