herosdevices.hardware.highfinesse.wsx
=====================================

.. py:module:: herosdevices.hardware.highfinesse.wsx

.. autoapi-nested-parse::

   Device driver for Highfinesse WSx series wavelength meters.





Module Contents
---------------

.. py:class:: 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.


   .. py:attribute:: dll


   .. py:attribute:: wavemeter_index
      :value: 0



   .. py:attribute:: channels


   .. py:property:: version
      :type: dict


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

      :returns: dictionary with keys model, version, software_revision
      :rtype: dict


   .. py:method:: get_wavelength(channel: int = 1) -> float

      Read the measured light wavelength at the given channel.

      :param 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
      :rtype: float



   .. py:method:: get_frequency(channel: int = 1) -> float | int

      Read the measured light frequency at the given channel.

      :param 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
      :rtype: float



   .. py:property:: temperature
      :type: float


      Read temperature of the wavemeter's internal temperature sensor.


   .. py:method:: get_exposure_time(channel: int = 1) -> int

      Read exposure time of the given channel.

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

      :returns: exposure time in milliseconds
      :rtype: int



   .. py:method:: set_exposure_time(exposure_time: int, channel: int = 1, arr: int = 1) -> bool | int

      Set the exposure time of the given channel.

      :param channel: channel for which to set the exposure time (if wavemeter is in switch mode)
      :param arr: which sensor to set the exposure time for

      :returns: success of the operation. Negative integers indicate errors.
      :rtype: bool|int



   .. py:method:: get_auto_exposure_mode(channel: int = 1) -> bool

      Get the status of the automatic exposure time setting.

      :param 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.
      :rtype: bool



   .. py:method:: set_auto_exposure_mode(enable: bool, channel: int = 1) -> bool | int

      Set the status of the automatic exposure time setting.

      :param 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.
      :rtype: bool|int



   .. py:method:: get_exposure_range(arr: int = 1) -> tuple[int, int]

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

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

      :returns: minimum and maximum exposure time
      :rtype: tuple(int)



   .. py:property:: switch_mode
      :type: bool


      Get state of the multiplex switcher.


   .. py:method:: get_switcher_signal_state(channel: int = 1) -> int | tuple[bool, bool]

      Retrieve the status of the "use" and "show" options of the defined channel.

      :param channel: channel for which to get the "use" and "show" state.

      :returns: state of the switches in the form (use, show).
      :rtype: tuple(bool)



   .. py:method:: 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.

      :param use: state to set for the "use" switch.
      :param show: state to set for the "show" switch.
      :param channel: channel for which to set the "use" and "show" state.

      :returns: success of the operation. Negative integers indicate errors.
      :rtype: bool|int



   .. py:method:: 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.

      :param wavelength: wavelength to set as target wavelength
      :param channel: channel for which to set the target wavelength.

      :returns: success of the operation. Negative integers indicate errors.
      :rtype: bool|int



