catalight.equipment.light_sources.diode_control.Diode_Laser
- class catalight.equipment.light_sources.diode_control.Diode_Laser
Bases:
objectVirtual instance of diode laser.
Virtual object for interfacing with Thorlabs diode driver system via an MCC DAQ device. The DAQ board should be connected to the current control system via BNC cables. A voltage is supplied by the DAQ board to send a current from the current controller to the diode driver, thus emitting a specified power from the laser. The user must perform a calibration of the system prior to using this class!
- __init__()
Methods
I_to_P(I)converts a current to power based on read calibration
P_to_I(P)Convert a power to current based on read calibration.
__init__()Convert DAQ voltage to current measurement.
Get output power based on current measured and saved calibration.
Append (date and current power setpoint) to the log at save_path.
Print the output current and power to console.
Update calibration attr based on module level calibration file.
set_current(I_set)Set current output of controller.
set_power(P_set)Send signal to DAQ to reach desired P_set value based on calibration.
Set power of laser to 0 by setting DAQ Voltage to 0.
start_logger([log_frequency, save_path])Start the data log function to record the laser set point.
Cancel timer initialized w/ start_logger() and delete it.
time_warning(time_left)Play audio warning that laser will engage in time_left minutes.
update_calibration(slope, intercept)Write calibration info to file.
Attributes
(mA) Max current
Current laser setpoint
Analog input info
Analog input range
Analog output info
Analog output range
Current bandwidth of laser, read-only
[min, max] Min/Max bandwidth of tunable laser, read-only
Current wavelength of laser, read-only
DAQ info
Defines whether laser class is tunable.
(mA/V) Conversion Factor
[min, max] Min/Max wavelength of tunable laser, read-only
Used to block access from multiple threads
Location of DAQ in "instacal" software.
- property I_max
(mA) Max current
- I_to_P(I)
converts a current to power based on read calibration
- property P_set
Current laser setpoint
- P_to_I(P)
Convert a power to current based on read calibration.
- _I_max
(mA) Max current of current controller
- _k_mod
(mA/V)
- property ai_info
Analog input info
- property ai_range
Analog input range
- property ao_info
Analog output info
- property ao_range
Analog output range
- property bandwidth
Current bandwidth of laser, read-only
- property bandwidth_range
[min, max] Min/Max bandwidth of tunable laser, read-only
- board_num
Location of DAQ in “instacal” software.
- property central_wavelength
Current wavelength of laser, read-only
- property daq_dev_info
DAQ info
- get_output_current()
Convert DAQ voltage to current measurement.
- get_output_power()
Get output power based on current measured and saved calibration.
- is_busy
Used to block access from multiple threads
- property k_mod
(mA/V) Conversion Factor
- log_power()
Append (date and current power setpoint) to the log at save_path.
- print_output()
Print the output current and power to console.
- read_calibration()
Update calibration attr based on module level calibration file.
Also prints out calibration date and values to console.
- set_current(I_set)
Set current output of controller.
Use this when running calibration. Reads warning messages when changing power
- set_power(P_set)
Send signal to DAQ to reach desired P_set value based on calibration.
The necessary current is sent based on a externally performed calibration. * Raises speaker volume * Sends voice warning * Prints time to complete ramp * ramps from current setpoint to P_set at 650 mA/min to avoid equipment damage * Redefined _P_set along the way, printing status at each step * Calls print_output() on completion
- shut_down()
Set power of laser to 0 by setting DAQ Voltage to 0.
- start_logger(log_frequency=0.1, save_path=None)
Start the data log function to record the laser set point.
Records constantly until stop_logger() is called. Creates self.timer and self.save_path when called.
- Parameters:
log_frequency (float or int, optional) – (seconds) interval to record data with. The default is 0.1 sec.
save_path (str, optional) – Full tile path to save data to. If None, saves in module directory with file name ‘YYYYMMDDlaser_log.txt’. Appends int to end of file name if file name already exists.
- stop_logger()
Cancel timer initialized w/ start_logger() and delete it.
- time_warning(time_left)
Play audio warning that laser will engage in time_left minutes.
- update_calibration(slope, intercept)
Write calibration info to file.
Calibration file path is defined at module level on import. Also saves date of calibration. Overwrites previous calibration!
- property wavelength_range
[min, max] Min/Max wavelength of tunable laser, read-only