catalight.equipment.light_sources.nkt_system.NKT_System
- class catalight.equipment.light_sources.nkt_system.NKT_System
Bases:
objectThis class wraps together the Varia and Extreme classes of nkt_tools.
The methods contained within are compatible with the rest of catalight. Not that this class is not compatible with NKT hardware different from an Extreme/Fianium laser connected to a Varia. Users with other hardwawre will need to develop their own plug in, but a guide was developed to demonstrate how the NKT_System and nkt_tool was written and integrated.
- __init__()
Methods
__init__()Get output power based on laser setpoint and saved calibration.
Get output power based on laser setpoint.
Append (date and current power setpoint) to the log at save_path.
max_constant_power(bandwidth, wavelength_range)Estimate the maximum power that can be acheived across a given range.
Print the bandpass settings, power setpoint, and expected power.
Update calibration attr based on module level calibration file.
run_calibration(meter)Perform a calibration experiment, analyze results, and verify quality.
set_bandpass(center, width)Updates the bandpass setting of the connected Varia.
set_power(P_set)Estimates a power setpoint for NKT laser based on calibration.
set_setpoint(setpoint)Sets power setpoint (in %) directly.
Set power of laser to 0 by turning off emission.
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
The bandwidth for the nkt laser, read-only.
[min, max] Min/Max bandwidth of tunable laser, read-only
The center wavelength for the nkt 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
The bandwidth for the nkt laser, read-only.
Set with set_bandpass()
- property bandwidth_range
[min, max] Min/Max bandwidth of tunable laser, read-only
- property central_wavelength
The center wavelength for the nkt laser, read-only.
Set with set_bandpass()
- get_output_power()
Get output power based on laser setpoint and saved calibration.
- get_output_setpoint()
Get output power based on laser setpoint.
- is_busy
Used to block access from multiple threads
- log_power()
Append (date and current power setpoint) to the log at save_path.
- max_constant_power(bandwidth, wavelength_range)
Estimate the maximum power that can be acheived across a given range.
Predicts the maximum power that can be delivered across the wavelength range for a given bandwidth, then returns the minimum value.
- print_output()
Print the bandpass settings, power setpoint, and expected power.
- read_calibration()
Update calibration attr based on module level calibration file.
Also prints out calibration date and values to console.
- run_calibration(meter)
Perform a calibration experiment, analyze results, and verify quality.
Will run the scripts: nkt_collect_calibration, nkt_analyze_calibration, and nkt_verify_calibration. Loads the collected calibration before proceeding to verification experiment.
- Parameters:
meter (catalight.equipment.power_meter.newport.NewportMeter) – Compatible power meter to use for calibration experiments.
- set_bandpass(center, width)
Updates the bandpass setting of the connected Varia.
The setting provided must ensure the bandpass doesn’t extend past 400 or 800 nm. The code will check and abort adjustment if the check fails. This method will also update the power setpoint of the NKT laser such that the emission after adjusting the wavelength is consistent with the last requested output power.
- set_power(P_set)
Estimates a power setpoint for NKT laser based on calibration.
Takes into account current bandpass filter settings to predict the power setpoint needed to achieve the requested emitted power.
Raises speaker volume
Sends voice warning
Redefined _P_set
Calls print_output() on completion
- set_setpoint(setpoint)
Sets power setpoint (in %) directly.
- shut_down()
Set power of laser to 0 by turning off emission. Also lowers setpoint power to 12%.
- 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