pylablib.devices.HighFinesse package

Submodules

pylablib.devices.HighFinesse.wlm module

pylablib.devices.HighFinesse.wlm.muxchannel(*args, **kwargs)[source]

Multiplex the function over its channel argument

class pylablib.devices.HighFinesse.wlm.TDeviceInfo(model, serial_number, revision_number, compilation_number)

Bases: tuple

compilation_number
count()

Return number of occurrences of value.

index()

Return first index of value.

Raises ValueError if the value is not present.

model
revision_number
serial_number
class pylablib.devices.HighFinesse.wlm.WLM(version=None, dll_path=None, app_path=None, autostart=True)[source]

Bases: pylablib.core.devio.interface.IDevice

Generic HighFinesse wavemeter.

Parameters:
  • version (int) – wavemeter version; if None, use any available version
  • dll_path – path to wlmData.dll; if None, use standard locations or search based on the version
  • app_path – path to the wavemeter server application (looks like wlm_ws.exe or wlm_ws7.exe); if None, try to autodetect, or rely on the server already running
  • autostart – if True, start measurements automatically (if the wavemeter server app is not running, it will launch with the measurements stopped).
Error = <Mock name='mock.HighFinesseError' id='140259570238288'>
open()[source]

Open the connection to the wavemeter

close()[source]

Close the connection to the wavemeter

is_opened()[source]

Check if the device is connected

get_device_info()[source]

Get the wavemeter info.

Return tuple (model, serial_number, revision_number, compilation_number).

start_measurement()[source]

Start wavemeter measurement

stop_measurement()[source]

Stop wavemeter measurement

is_measurement_running()[source]

Check if the measurement is running

set_read_mode(mode)[source]

Set value read mode, which applies to get_frequency() and get_wavelength().

Can be "latest" (always return the latest measurement result; default), or "single" (if there’s no new measurement since the last call, the result is "noval" which, depending on the arguments, causes wait, is returned as is, or raises an error).

get_read_mode()[source]

Get value read mode, which applies to get_frequency() and get_wavelength().

Can be "latest" (always return the latest measurement result; default), or "single" (if there’s no new measurement since the last call, the result is "noval" which, depending on the arguments, causes wait, is returned as is, or raises an error).

get_channels_number(refresh=True)[source]

Get number of channels in the wavemeter

get_default_channel()[source]

Get the default channel (starting from 1) which is used for querying

set_default_channel(channel)[source]

Set the default channel (starting from 1) which is used for querying

get_frequency(channel=None, error_on_invalid=True, wait=True, timeout=5.0)[source]

Get the wavemeter readings (in Hz) on a given channel.

channel is the measurement channel (starting from 1); if None, use the default channel. If error_on_invalid==True, raise an error if the measurement is invalid (e.g., over- or underexposure); otherwise, the method can return "under" if the meter is underexposed or "over" is it is overexposed, "badsig" if there is no calculable signal, "noval" if there are no values acquired yet, or "nosig" if there is no signal. If wait==True and the result is "noval" (e.g., if the read mode is "single" and no new value has been acquired since the last call), wait for at most timeout until a new value appears; if the timeout has passed, use the default behavior (error or "noval" result).

get_wavelength(channel=None, error_on_invalid=True, wait=True, timeout=5.0)[source]

Get the wavemeter readings (in m, and in vacuum).

channel is the measurement channel (starting from 1); if None, use the default channel. If error_on_invalid==True, raise an error if the measurement is invalid (e.g., over- or underexposure); otherwise, the method can return "under" if the meter is underexposed or "over" is it is overexposed, "badsig" if there is no calculable signal, "noval" if there are no values acquired yet, or "nosig" if there is no signal. If wait==True and the result is "noval" (e.g., if the read mode is "single" and no new value has been acquired since the last call), wait for at most timeout until a new value appears; if the timeout has passed, use the default behavior (error or "noval" result).

get_exposure_mode(channel=None)[source]

Get the exposure mode ("manual" or "auto") at the given channel

set_exposure_mode(mode='auto', channel=None)[source]

Set the exposure mode ("manual" or "auto") at the given channel

get_exposure(sensor=1, channel=None)[source]

Get the exposure for a given channel and sensor (starting from 1)

set_exposure(exposure, sensor=1, channel=None)[source]

Manually set the exposure for a given channel and sensor (starting from 1)

get_switcher_mode()[source]

Get the switcher mode ("off" for manual switching or "on" for cycling mode)

set_switcher_mode(mode='on')[source]

Set the switcher mode ("off" for manual switching or "on" for cycling mode)

get_active_channel()[source]

Get the current active channel

set_active_channel(channel, automode=True)[source]

Set the current switcher channel.

Only makes sense in the manual ("off") switcher mode. If automode==True, switch to this mode automatically.

is_switcher_channel_enabled(channel, automode=True)[source]

Check whether the switcher channel enabled.

Only works in the cycling ("on") switcher mode. If automode==True, switch to this mode automatically.

is_switcher_channel_shown(channel, automode=True)[source]

Check whether the switcher channel is shown in the wavemeter control application.

Only works in the cycling ("on") switcher mode. If automode==True, switch to this mode automatically.

enable_switcher_channel(channel, enable=True, show=None, automode=True)[source]

Enable or disable the current switcher channel in the switch mode.

Only works in the cycling ("on") switcher mode. If automode==True, switch to this mode automatically.

get_pulse_mode()[source]

Get the current pulse mode.

Can be "cw" (CW laser mode), "int" (standard single-laser internally triggered mode), "ext" (single- or double-laser mode with external TTL trigger), or "opt" (double-laser mode with optical triggering).

set_pulse_mode(mode)[source]

Set the current pulse mode.

Can be "cw" (CW laser mode), "int" (standard single-laser internally triggered mode), "ext" (single- or double-laser mode with external TTL trigger), or "opt" (double-laser mode with optical triggering).

get_precision_mode()[source]

Set the current precision mode ("fine", "wide", or "grating")

set_precision_mode(mode)[source]

Set the current precision mode ("fine", "wide", or "grating")

get_measurement_interval()[source]

Set measurement interval (per channel), or None if the interval mode is off

set_measurement_interval(interval=None)[source]

Set measurement interval (per channel).

None means that the interval mode is off.

calibrate(source_type, source_frequency, channel=None)[source]

Initialize the calibration.

source_type is the calibration source type, which can be "hene_633" (HeNe 633nm laser), "hene_1152" (HeNe 1152nm laser), "hene_free" (free-running HeNe laser), "nel" (Ne lamp), or "other" (other source). source_frequency is the exact source frequency (in Hz) sent through the given channel.

get_autocalibration_parameters()[source]

Get up the automatic calibration parameters.

Return tuple (enable, unit, period), where enable determines if it is enabled, and unit and period together specify the calibration period. unit can be "start" (once on the measurement start; period is irrelevant here), "meas" (once every period frequency measurements), "min" (once every period minutes), "hours", or "days".

setup_autocalibration(enable=True, unit=None, period=None)[source]

Set up the automatic calibration parameters.

enable determines if it is enabled. unit and period together specify the calibration period. unit can be "start" (once on the measurement start; period is irrelevant here), "meas" (once every period frequency measurements), "min" (once every period minutes), "hours", or "days". Any None parameters are kept at the present value.

class NoParameterCaller(device, kind)

Bases: object

Class to simplify calling functions without a parameter

apply_settings(settings)

Apply the settings.

settings is the dict {name: value} of the device available settings. Non-applicable settings are ignored.

get_device_variable(key)

Get the value of a settings, status, or full info parameter

get_full_info(include=0)

Get dict {name: value} containing full device information (including status and settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_full_status(include=0)

Get dict {name: value} containing the device status (including settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_settings(include=0)

Get dict {name: value} containing all the device settings.

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

set_device_variable(key, value)

Set the value of a settings parameter

Module contents