This tunable laser in the C and L-band from Pure-Photonics can be controlled via serial communication.
Please install the PySerial package by running the following command:
pip install pyserial
import time
from itla import ITLA
def main():
port = "COM3" # Replace with the appropriate COM port for your ITLA laser
itla_laser = ITLA(port)
# Set laser power on
itla_laser.set_laser_power_on()
print("Laser power on")
# Wait for 5 seconds
time.sleep(10)
# Get measured optical output power in dBm
optical_output_power_dBm = itla_laser.get_measured_optical_output_power_dBm()
print(f"Measured optical output power: {optical_output_power_dBm} dBm")
# Set laser power off
itla_laser.set_laser_power_off()
print("Laser power off")
if __name__ == "__main__":
main()
This example code does the following:
Imports the necessary modules and the ITLA class from the itla.py file provided.
Defines a main function that:
Make sure to replace the port variable with the appropriate COM port for your Pure-Photonics ITLA laser.