This Thorlabs Erbuium doped fiber amplifier (EDFA) 300s can be controlled via a usb interface.
pip install pyvisa
Below we show an example, showing how to use pyvisa to obtain data from your polarimeter.
from tledfa300s import EDFA300S
def main():
# Create an instance of the EDFA class
port = "COM1" # Replace "COM1" with the appropriate port for your system
edfa = EDFA(port)
# Get help and status information
print(edfa.get_status())
# Enable the laser and set the laser diode current to 50%
edfa.enable_laser()
edfa.set_laser_diode_current(50)
# Get the current laser diode current
print(edfa.get_laser_diode_current())
# Disable the laser and close the serial connection
edfa.disable_laser()
edfa.close()
if __name__ == "__main__":
main()
This example code does the following:
This script uses the EDFA class to interact with the Thorlabs EDFA 300s device.
The script creates an instance of the EDFA class with the appropriate serial port.
Please look up the documentation for your operating system on how to identify the serial port.