herosdevices.hardware.highfinesse.wsx - Heros Devices 0.6.0 documentation

Skip to content
Back to top
View this page

# herosdevices.hardware.highfinesse.wsx

Device driver for Highfinesse WSx series wavelength meters.

## Module Contents

class herosdevices.hardware.highfinesse.wsx.WSx(dll_path: str = 'C:\\Windows\\System32\\wlmData.dll', wavemeter_index: int = 0, channels: tuple = tuple(range(8)))

  A Highfinesse WSx series wavelength meter.

  Tested with WS6 and WS7.

  Hardware driver to communicate with a High Finesse WSx Wavemeter via the DLL in present in Windows systems with the vendor software installed.

  dll
  wavemeter_index = 0
  channels
  property version: dict

    Retrieve model, version, and software version from the device.

    Returns:

      dictionary with keys model, version, software_revision

    Return type:

      dict

  get_wavelength(channel: int = 1) → float

    Read the measured light wavelength at the given channel.

    Parameters:

      channel – channel to be read (if wavemeter is in switch mode)

    Returns:

      vac wavelength in nm, if channel is not used or underexposed returns -3,

        if channel is overexposed returns -4

    Return type:

      float

  get_frequency(channel: int = 1) → float | int

    Read the measured light frequency at the given channel.

    Parameters:

      channel – channel to be read (if wavemeter is in switch mode)

    Returns:

      frequency in THz, if channel is not used or underexposed returns -3,

        if channel is overexposed returns -4

    Return type:

      float

  property temperature: float

    Read temperature of the wavemeter’s internal temperature sensor.

  get_exposure_time(channel: int = 1) → int

    Read exposure time of the given channel.

    Parameters:

      channel – channel for which to read the exposure time (if wavemeter is in switch mode)

    Returns:

      exposure time in milliseconds

    Return type:

      int

  set_exposure_time(exposure_time: int, channel: int = 1, arr: int = 1) → bool | int

    Set the exposure time of the given channel.

    Parameters:

      - channel – channel for which to set the exposure time (if wavemeter is in switch mode)

      - arr – which sensor to set the exposure time for

    Returns:

      success of the operation. Negative integers indicate errors.

    Return type:

      bool|int

  get_auto_exposure_mode(channel: int = 1) → bool

    Get the status of the automatic exposure time setting.

    Parameters:

      channel – channel for which to get the automatic exposure time setting (if wavemeter is in switch mode)

    Returns:

      state of the automatic exposure time setting.

    Return type:

      bool

  set_auto_exposure_mode(enable: bool, channel: int = 1) → bool | int

    Set the status of the automatic exposure time setting.

    Parameters:

      channel – channel for which to set the automatic exposure time setting (if wavemeter is in switch mode)

    Returns:

      success of the operation. Negative integers indicate errors.

    Return type:

      bool|int

  get_exposure_range(arr: int = 1) → tuple[int, int]

    Get the possible range of exposure times for the given array/sensor.

    Parameters:

      arr – array/sensor for which to get the possible exposure times

    Returns:

      minimum and maximum exposure time

    Return type:

      tuple(int)

  property switch_mode: bool

    Get state of the multiplex switcher.

  get_switcher_signal_state(channel: int = 1) → int | tuple[bool, bool]

    Retrieve the status of the “use” and “show” options of the defined channel.

    Parameters:

      channel – channel for which to get the “use” and “show” state.

    Returns:

      state of the switches in the form (use, show).

    Return type:

      tuple(bool)

  set_switcher_signal_state(use: bool, show: bool, channel: int = 1) → bool | int

    Set the status of the “use” and “show” options of the defined channel.

    Parameters:

      - use – state to set for the “use” switch.

      - show – state to set for the “show” switch.

      - channel – channel for which to set the “use” and “show” state.

    Returns:

      success of the operation. Negative integers indicate errors.

    Return type:

      bool|int

  set_target_wavelength_vacuum(wavelength: float, channel: int = 1) → bool | int

    Set the target vacuum wavelength, i.e. if a laser is stabilized to the wavemeter.

    Parameters:

      - wavelength – wavelength to set as target wavelength

      - channel – channel for which to set the target wavelength.

    Returns:

      success of the operation. Negative integers indicate errors.

    Return type:

      bool|int