catalight.equipment.light_sources.template.Template_Laser
- class catalight.equipment.light_sources.template.Template_Laser
Bases:
objectVi
- __init__()
Methods
__init__()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_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
Current laser setpoint
[min, max] Min/Max bandwidth of tunable laser, read-only
Defines whether laser class is tunable.
[min, max] Min/Max wavelength of tunable laser, read-only
Used to block access from multiple threads
- property P_set
Current laser setpoint
- property bandwidth_range
[min, max] Min/Max bandwidth of tunable laser, read-only
- get_output_power()
Get output power based on current measured and saved calibration.
- is_busy
Used to block access from multiple threads
- 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_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