catalight.equipment.run_diode_calibration.main

catalight.equipment.run_diode_calibration.main(current_range=(150, 800, 35), wavelength=450, tolerance=10)

Runs a calibration on the connected Diode_Laser.

The current is varied based on the supplied current_range and the power is measured using the attached NewportMeter. The sampling time is the default defined in the NewportMeter class (0.5 sec/sample). Data is collected until 20 samples and the desired tolerance factor is met. Calibration results are saved locally to be accessed when initializing the Diode_Laser class. A plot showing the fit is produced. Only linear fits are supported at the moment (2023/02/09).

Hardware Configuration: The laser should be on, connected to the DAQ board, and the current turned to 0 on the current controller. The power meter needs to be placed in the beam path at the location in which the user would like to calibrate the output (i.e. at the sample)

Parameters:
  • current_range (tuple, optional) – (I_min, I_max, step) tuple sent to range(). Used to control the testing range. Current cycled from I_min to I_max in steps. The default is (150, 800, 35).

  • wavelength (int or float, optional) – Wavelength of diode. The default is 450.

  • tolerance (int or float, optional) – Tolerance for each data point in percent. Sampling will continue until 20 points have been collected and the standard deviation is less than the requested tolerance. Default sampling time is 0.5 seconds/point. The default is 10.

Returns:

  • fig (matplotlib.pyplot.figure) – Figure handle for calibration plot.

  • ax (matplotlib.pyplot.axis) – Axis handle for calibration plot.