ThorLabs¶
PM100USB
USB Power Meter¶
-
class
instruments.thorlabs.
PM100USB
(filelike)¶ Instrument class for the ThorLabs PM100USB power meter. Note that as this is an SCPI-compliant instrument, the properties and methods of
SCPIInstrument
may be used as well.-
class
MeasurementConfiguration
¶ Enum containing valid measurement modes for the PM100USB
-
current
= <MeasurementConfiguration.current: 'CURR'>¶
-
energy
= <MeasurementConfiguration.energy: 'ENER'>¶
-
energy_density
= <MeasurementConfiguration.energy_density: 'EDEN'>¶
-
frequency
= <MeasurementConfiguration.frequency: 'FREQ'>¶
-
power
= <MeasurementConfiguration.power: 'POW'>¶
-
power_density
= <MeasurementConfiguration.power_density: 'PDEN'>¶
-
resistance
= <MeasurementConfiguration.resistance: 'RES'>¶
-
temperature
= <MeasurementConfiguration.temperature: 'TEMP'>¶
-
voltage
= <MeasurementConfiguration.voltage: 'VOLT'>¶
-
-
class
PM100USB.
Sensor
(parent)¶ Class representing a sensor on the ThorLabs PM100USB
Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
PM100USB
class.-
flags
¶ Gets any sensor flags set on the sensor channel
Type: collections.namedtuple
-
-
class
PM100USB.
SensorFlags
¶ Enum containing valid sensor flags for the PM100USB
-
has_temperature_sensor
= <SensorFlags.has_temperature_sensor: 256>¶
-
is_energy_sensor
= <SensorFlags.is_energy_sensor: 2>¶
-
is_power_sensor
= <SensorFlags.is_power_sensor: 1>¶
-
response_settable
= <SensorFlags.response_settable: 16>¶
-
tau_settable
= <SensorFlags.tau_settable: 64>¶
-
wavelength_settable
= <SensorFlags.wavelength_settable: 32>¶
-
-
PM100USB.
read
(size=-1)¶ Reads a measurement from this instrument, according to its current configuration mode.
Parameters: size (int) – Number of bytes to read from the instrument. Default of -1
reads until a termination character is found.Units: As specified by measurement_configuration
.Return type: Quantity
-
PM100USB.
averaging_count
¶ Integer specifying how many samples to collect and average over for each measurement, with each sample taking approximately 3 ms.
-
PM100USB.
cache_units
¶ If enabled, then units are not checked every time a measurement is made, reducing by half the number of round-trips to the device.
Warning
Setting this to
True
may cause incorrect values to be returned, if any commands are sent to the device either by its local panel, or by software other than InstrumentKit.Type: bool
-
PM100USB.
flag
= <SensorFlags.has_temperature_sensor: 256>¶
-
PM100USB.
measurement_configuration
¶ Returns the current measurement configuration.
Return type: PM100USB.MeasurementConfiguration
-
PM100USB.
sensor
¶ Returns information about the currently connected sensor.
Type: PM100USB.Sensor
-
class
ThorLabsAPT
ThorLabs APT Controller¶
-
class
instruments.thorlabs.
ThorLabsAPT
(filelike)¶ Generic ThorLabs APT hardware device controller. Communicates using the ThorLabs APT communications protocol, whose documentation is found in the thorlabs source folder.
-
class
APTChannel
(apt, idx_chan)¶ Represents a channel within the hardware device. One device can have many channels, each labeled by an index.
-
ThorLabsAPT.
identify
()¶ Causes a light on the APT instrument to blink, so that it can be identified.
-
ThorLabsAPT.
channel
¶ Gets the list of channel objects attached to the APT controller.
A specific channel object can then be accessed like one would access a list.
Type: tuple
ofAPTChannel
-
class
-
class
instruments.thorlabs.
APTPiezoStage
(filelike)¶ Class representing a Thorlabs APT piezo stage
-
class
instruments.thorlabs.
APTStrainGaugeReader
(filelike)¶ Class representing a Thorlabs APT strain gauge reader.
Warning
This is not currently implemented
-
class
StrainGaugeChannel
(apt, idx_chan)¶ Class representing a single strain gauge channel attached to a
APTStrainGaugeReader
on the Thorlabs APT controller.Warning
This is not currently implemented
-
class
-
class
instruments.thorlabs.
APTMotorController
(filelike)¶ Class representing a Thorlabs APT motor controller
-
class
MotorChannel
(apt, idx_chan)¶ Class representing a single motor attached to a Thorlabs APT motor controller (
APTMotorController
).-
go_home
()¶ Instructs the specified motor channel to return to its home position
-
move
(pos, absolute=True)¶ Instructs the specified motor channel to move to a specific location. The provided position can be either an absolute or relative position.
Parameters: - pos (
Quantity
) – The position to move to. Provided value will be converted to encoder counts. - absolute (bool) – Specify if the position is a relative or
absolute position.
True
means absolute, whileFalse
is for a relative move.
Units pos: As specified, or assumed to of units encoder counts
- pos (
-
set_scale
(motor_model)¶ Sets the scale factors for this motor channel, based on the model of the attached motor and the specifications of the driver of which this is a channel.
Parameters: motor_model (str) – Name of the model of the attached motor, as indicated in the APT protocol documentation (page 14, v9).
-
position
¶ Gets the current position of the specified motor channel
Type: Quantity
-
position_encoder
¶ Gets the position of the encoder of the specified motor channel
Type: Quantity
Units: Encoder counts
-
scale_factors
= (array(1) * dimensionless, array(1) * dimensionless, array(1) * dimensionless)¶
-
-
class
SC10
Optical Beam Shutter Controller¶
-
class
instruments.thorlabs.
SC10
(filelike)¶ The SC10 is a shutter controller, to be used with the Thorlabs SH05 and SH1. The user manual can be found here: http://www.thorlabs.com/thorcat/8600/SC10-Manual.pdf
-
class
Mode
¶ Enum containing valid output modes of the SC10
-
auto
= <Mode.auto: 2>¶
-
external
= <Mode.external: 5>¶
-
manual
= <Mode.manual: 1>¶
-
repeat
= <Mode.repeat: 4>¶
-
single
= <Mode.single: 3>¶
-
-
SC10.
default
()¶ Restores instrument to factory settings.
Returns 1 if successful, zero otherwise.
Return type: int
-
SC10.
restore
()¶ Loads the settings from memory.
Returns 1 if successful, zero otherwise.
Return type: int
-
SC10.
save
()¶ Stores the parameters in static memory
Returns 1 if successful, zero otherwise.
Return type: int
-
SC10.
save_mode
()¶ Stores output trigger mode and baud rate settings in memory.
Returns 1 if successful, zero otherwise.
Return type: int
-
SC10.
closed
¶ Gets the shutter closed status.
True
represents the shutter is closed, andFalse
for the shutter is open.Return type: bool
-
SC10.
enable
¶ Gets/sets the shutter enable status, False for disabled, True if enabled
If output enable is on (
True
), there is a voltage on the output.Return type: bool
-
SC10.
interlock
¶ Gets the interlock tripped status.
Returns
True
if the interlock is tripped, andFalse
otherwise.Return type: bool
-
SC10.
name
¶ Gets the name and version number of the device.
Returns: Name and verison number of the device Return type: str
-
SC10.
open_time
¶ Gets/sets the amount of time that the shutter is open, in ms
Units: As specified (if a Quantity
) or assumed to be of units milliseconds.Type: Quantity
-
SC10.
out_trigger
¶ Gets/sets the out trigger source.
0 trigger out follows shutter output, 1 trigger out follows controller output
Type: int
-
SC10.
shut_time
¶ Gets/sets the amount of time that the shutter is closed, in ms
Units: As specified (if a Quantity
) or assumed to be of units milliseconds.Type: Quantity
-
class
LCC25
Liquid Crystal Controller¶
-
class
instruments.thorlabs.
LCC25
(filelike)¶ The LCC25 is a controller for the thorlabs liquid crystal modules. it can set two voltages and then oscillate between them at a specific repetition rate.
The user manual can be found here: http://www.thorlabs.com/thorcat/18800/LCC25-Manual.pdf
-
class
Mode
¶ Enum containing valid output modes of the LCC25
-
normal
= <Mode.normal: 0>¶
-
voltage1
= <Mode.voltage1: 1>¶
-
voltage2
= <Mode.voltage2: 2>¶
-
-
LCC25.
default
()¶ Restores instrument to factory settings.
Returns 1 if successful, 0 otherwise
Return type: int
-
LCC25.
get_settings
(slot)¶ Gets the current settings to memory.
Returns 1 if successful, zero otherwise.
Parameters: slot ( int
) – Memory slot to use, valid range[1,4]
Return type: int
-
LCC25.
save
()¶ Stores the parameters in static memory
Returns 1 if successful, zero otherwise.
Return type: int
-
LCC25.
set_settings
(slot)¶ Saves the current settings to memory.
Returns 1 if successful, zero otherwise.
Parameters: slot ( int
) – Memory slot to use, valid range[1,4]
Return type: int
-
LCC25.
test_mode
()¶ Puts the LCC in test mode - meaning it will increment the output voltage from the minimum value to the maximum value, in increments, waiting for the dwell time
Returns 1 if successful, zero otherwise.
Return type: int
-
LCC25.
dwell
¶ Gets/sets the dwell time for voltages for the test mode.
Units: As specified (if a Quantity
) or assumed to be of units milliseconds.Return type: Quantity
-
LCC25.
enable
¶ Gets/sets the output enable status.
If output enable is on (
True
), there is a voltage on the output.Return type: bool
-
LCC25.
extern
¶ Gets/sets the use of the external TTL modulation.
Value is
True
for external TTL modulation andFalse
for internal modulation.Return type: bool
-
LCC25.
frequency
¶ Gets/sets the frequency at which the LCC oscillates between the two voltages.
Units: As specified (if a Quantity
) or assumed to be of units Hertz.Return type: Quantity
-
LCC25.
increment
¶ Gets/sets the voltage increment for voltages for the test mode.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Return type: Quantity
-
LCC25.
max_voltage
¶ Gets/sets the maximum voltage value for the test mode. If the maximum voltage is less than the minimum voltage, nothing happens.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Return type: Quantity
-
LCC25.
min_voltage
¶ Gets/sets the minimum voltage value for the test mode.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Return type: Quantity
-
LCC25.
mode
¶ Gets/sets the output mode of the LCC25
Return type: LCC25.Mode
-
LCC25.
remote
¶ Gets/sets front panel lockout status for remote instrument operation.
Value is
False
for normal operation andTrue
to lock out the front panel buttons.Return type: bool
-
LCC25.
voltage1
¶ Gets/sets the voltage value for output 1.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Return type: Quantity
-
LCC25.
voltage2
¶ Gets/sets the voltage value for output 2.
Units: As specified (if a Quantity
) or assumed to be of units Volts.Return type: Quantity
-
class
TC200
Temperature Controller¶
-
class
instruments.thorlabs.
TC200
(filelike)¶ The TC200 is is a controller for the voltage across a heating element. It can also read in the temperature off of a thermistor and implements a PID control to keep the temperature at a set value.
The user manual can be found here: http://www.thorlabs.com/thorcat/12500/TC200-Manual.pdf
-
class
Mode
¶ Enum containing valid output modes of the TC200.
-
cycle
= <Mode.cycle: 1>¶
-
normal
= <Mode.normal: 0>¶
-
-
class
TC200.
Sensor
¶ Enum containing valid temperature sensor types for the TC200.
-
ntc10k
= <Sensor.ntc10k: 'ntc10k'>¶
-
ptc100
= <Sensor.ptc100: 'ptc100'>¶
-
ptc1000
= <Sensor.ptc1000: 'ptc1000'>¶
-
th10k
= <Sensor.th10k: 'th10k'>¶
-
-
TC200.
name
()¶ Gets the name and version number of the device
Returns: the name string of the device Return type: str
-
TC200.
beta
¶ Gets/sets the beta value of the thermistor curve.
Value within [2000, 6000]
Returns: the gain (in nnn) Type: int
-
TC200.
degrees
¶ Gets/sets the units of the temperature measurement.
Returns: The temperature units (degC/F/K) the TC200 is measuring in Type: UnitTemperature
-
TC200.
enable
¶ Gets/sets the heater enable status.
If output enable is on (
True
), there is a voltage on the output.Type: bool
-
TC200.
i
¶ Gets/sets the i-gain. Valid numbers are [1,250]
Returns: the i-gain (in nnn) Return type: int
-
TC200.
max_power
¶ Gets/sets the maximum power
Returns: The maximum power Units: Watts (linear units) Type: Quantity
-
TC200.
max_temperature
¶ Gets/sets the maximum temperature
Returns: the maximum temperature (in deg C) Units: As specified or assumed to be degree Celsius. Returns with units degC. Return type: Quantity
-
TC200.
mode
¶ Gets/sets the output mode of the TC200
Type: TC200.Mode
-
TC200.
p
¶ Gets/sets the p-gain. Valid numbers are [1,250].
Returns: the p-gain (in nnn) Return type: int
-
TC200.
pid
¶ Gets/sets all three PID values at the same time. See
TC200.p
,TC200.i
, andTC200.d
for individual restrictions.If
None
is specified then the corresponding PID value is not changed.Returns: List of integers of PID values. In order [P, I, D]. Type: list
ortuple
Return type: list
-
TC200.
sensor
¶ Gets/sets the current thermistor type. Used for converting resistances to temperatures.
Returns: The thermistor type Type: TC200.Sensor
-
class