LCC25 (thorlabs) model¶
This class (variable_waveplate_gui.py) is the model to drive the LCC25 variable waveplate controller.
It ads the use of units with pint and the wavelength calibration to obtain make the variable waveplate a quarter waveplate for a given wavelength.
copyright: | by Hyperion Authors, see AUTHORS for more details. |
---|---|
license: | BSD, see LICENSE for more details. |
-
class
hyperion.instrument.polarization.variable_waveplate.
VariableWaveplate
(settings)¶ This class is the model for the LCC25 analog voltage generator for the variable waveplate from thorlabs.
-
do_interp
(w, x, y)¶ This function interpolates the voltage value for the wavelength value w, using the calibration data (x,y) where x is wavelength and y is voltage
Parameters: - w (pint quantity) – desired wavelength
- x (pint quantity) – wavelength vector from calibration
- y (pint quantity) – calibrated voltage values
Returns: the voltage for the desired wavelength
Return type: pint quantity
-
finalize
(state=False)¶ Closes the connection to the device
-
freq
¶ Modulation frequency when the operation mode is ‘modulation’ (mode = 0)
: getter :
Asks for the current frequency
Returns: The frequency value Return type: pint quantity : setter :
Parameters: F (pint Quantity) – frequency in Hz. It can be any value between 0.5 and 150Hz.
-
get_analog_value
(channel)¶ Gets the analog voltage of the channel.
Parameters: channel (int) – Port number. Range depends on device Returns: voltage: voltage in use for the channel Return type: pint quantity
-
idn
()¶ Ask for the identification
-
initialize
()¶ initializes the connection with the controller
-
load_calibration
(cal_file)¶ This method loads the calibration file cal_file
Parameters: cal_file (string) – calibration file complete path, including extension (txt expected)
-
mode
¶ Operation mode
The possible modes are:
‘Modulation’: sends a 2kHz sin wave modulated with a square wave where voltage 1 is one limit and voltage 2 is the second. the modulation frequency can be changed with the command ‘freq’ in the 0.5-150 Hz range.
‘Voltage1’ : sends a 2kHz sin wave with RMS value set by voltage 1
‘Voltage2’ : sends a 2kHz sin wave with RMS value set by voltage 2
‘QWP’ : uses the calibration file to set the voltage that acts as a quarter-wave plate for the specified wavelength.
: getter :
Gets the current mode
Returns: current mode Return type: string : setter :
Sets the mode
Parameters: mode (string) – type of operation.
-
output
¶ Tells if the output is enabled or not.
Getter: Returns: output state Return type: logical Setter: Parameters: state (logical) – value for the amplitude to set in Volts
-
quarter_waveplate_voltage
(wavelength, method='lookup')¶ This method gives the voltage needed to set on the LCC25 to get a quarter waveplate (QWP) behaviour for a given wavelength. It is based on a calibration file that relates the QWP voltage to a wavelength and (so far) uses a linear fit to those data points.
Parameters: - wavelength (pint Quantity) – The input wavelength
- method (string) – method to extrapolate between measured data points
Returns: the QWP voltage
Return type: pint quantity
-
set_analog_value
(channel, value)¶ Sets the analog voltage of the channel.
Parameters: - channel (int) – Port number. Range depends on device
- value (pint quantity) – The input value in Volts between 0 and 25 (Pint type)
-
set_quarter_waveplate_voltage
(wavelength)¶ This method sets the quarter-wave plate (QWP) voltage to the variable-wave plate for a given wavelength. It uses Voltage 1 for output.
Parameters: wavelength (pint Quantity) – The input wavelength Returns: the voltage set to the controller Return type: pint quantity
-