catalight.equipment.light_sources.nkt_system.NKT_System

class catalight.equipment.light_sources.nkt_system.NKT_System

Bases: object

This 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()

Get output power based on laser setpoint and saved calibration.

get_output_setpoint()

Get output power based on laser setpoint.

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.

print_output()

Print the bandpass settings, power setpoint, and expected power.

read_calibration()

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.

shut_down()

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.

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.

Attributes

P_set

Current laser setpoint

bandwidth

The bandwidth for the nkt laser, read-only.

bandwidth_range

[min, max] Min/Max bandwidth of tunable laser, read-only

central_wavelength

The center wavelength for the nkt laser, read-only.

is_tunable

Defines whether laser class is tunable.

wavelength_range

[min, max] Min/Max wavelength of tunable laser, read-only

is_busy

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.

Returns:

P – Power [mW] rounded to 3 decimal points

Return type:

float or int

get_output_setpoint()

Get output power based on laser setpoint.

Returns:

setpoint – Power [%] rounded to nearest decimal point

Return type:

float or int

is_busy

Used to block access from multiple threads

is_tunable = True

Defines whether laser class is tunable. NKT system is.

Type:

bool

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.

Parameters:
  • bandwidth (float or int) – Bandwidth to use for estimation

  • wavelength_range (list[float or int]) – [lambda_min, lambda_max] center wavelength range to be tested.

Returns:

[mW] Maximum constant power for given parameters.

Return type:

float

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.

Parameters:
  • center (int or float) – [nm] Central wavelength to be used when tuning bandpass filter.

  • width (int or float) – [nm] Bandpass width.

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

Parameters:

P_set (int or float) – Desired laser output power in mW

set_setpoint(setpoint)

Sets power setpoint (in %) directly.

Parameters:

setpoint (int or float) – Desired laser output power in %

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.

Parameters:

time_left (int or float) – (min) Time to read out until setting laser

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!

Parameters:
  • slope (float) – Slope of linear calibration (mW/mA)

  • intercept (float) – Y intercept of linear calibration (mA)

property wavelength_range

[min, max] Min/Max wavelength of tunable laser, read-only