qmi.instruments.high_finesse.wlm
QMI instrument driver for the High Finesse Wavemeter instrument.
The instrument driver makes use of the manufacturer provided software libraries, “libwlmData.so” for Linux OS, or “wlmData.dll” for Windows, or “libwlmData.dylib” for MacOS. Please find the licence terms for these files as well as further documentation on the manufacturer’s website at https://www.highfinesse.com/en/support/downloads.html. This driver has been tested on the WS-6 model.
Classes
|
A network based driver for the High Finesse Wavelength meter. |
- class qmi.instruments.high_finesse.wlm.HighFinesse_Wlm(context: QMI_Context, name: str)
A network based driver for the High Finesse Wavelength meter.
This driver automatically detects the platform of the client and will load the respective driver library (wlmData.dll for Windows, libwlmData.so for Linux, and libwlmData.dylib for MacOS). Make sure that the library is available on your system and that the wlmData.ini file contains the IP address of the server.
- open() None
Connect to the instrument hardware.
When this method returns, the instrument must be ready for interaction via calls to instrument-specific methods.
Subclasses can extend this method to implement instrument-specific initialization. If they do, they should call
super().open()as a last statement.
- close() None
Close the connection to the instrument hardware and release associated resources.
When this method returns, the instrument must not be used again unless it is first re-opened by calling the open() method.
Subclasses can extend this method if they have specific resources to close. If they do, they should call
super().close()as a last statement.
- start_server() bool
Start the device server if it is not running already.
- Returns:
True if the server was started, or False if already running.
- stop_server() None
Stop the device server if it is running.
- get_version() str
Get the WLM version as a string.
- Returns:
The version in the format “WLM Version: [{type}.{version}.{revision}.{build}]”
- Return type:
str
- get_idn() QMI_InstrumentIdentification
Read instrument type and version and return QMI_InstrumentIdentification instance.
- get_operation_state() int
Get the instrument operation state. Possible return values are: - 0 : cStop. Wlm active but stopped, - 1 : cAdjustment. Wlm active and program is adjusting, - 2 : cMeasurement. Wlm active and measuring, recording or replaying.
- Returns:
The operation state integer.
- Return type:
op_state
- get_frequency(channel: int) float
Get the main results of the measurement of a specified signal.
- Parameters:
channel – The signal number (1 to 8) in case of a WLM with multichannel switch or with double pulse option (MLC). For WLMs without these options 1 should be overhanded.
- Returns:
The last measured frequency value in THz.
- Return type:
- Raises:
QMI_InstrumentException – In case of instrument error.
- get_wavelength(channel: int) float
Get the main results of the measurement of a specified signal.
- Parameters:
channel – The signal number (1 to 8) in case of a WLM with multichannel switch or with double pulse option (MLC). For WLMs without these options 1 should be overhanded.
- Returns:
The last measured wavelength in nm.
- Return type:
- get_power(channel: int) float
Get the power of the current measurement shot of a specified signal.
- Parameters:
channel – The signal number (1 to 8) in case of a WLM with multichannel switch or with double pulse option (MLC). For WLMs without these options 1 should be overhanded.
- Returns:
The power of the last measured cw or quasi cw signal in uW or the energy in uJ.
- Return type:
- set_data_pattern(index: int = 1, enable: bool = True) None
Enable or disable a pattern index to export data from instrument.
- Parameters:
index –
Index number for export control. Index values have the following meanings: - 0 : cSignal1Interferometers. The array received by the Fizeau interferometers or
diffraction grating.
1 : cSignal1WideInterferometer. Additional long interferometer or grating array.
1 : cSignal1Grating. Only in Grating analyzing versions! The array received by spectrum analysis (grating precision).
2 : cSignal2Interferometers. Only in Double Pulse versions! The array received by the Fizeau interferometers for the 2nd pulse.
3 : cSignal2WideInterferometer. Only in Double Pulse versions! Additional long interferometer array for 2nd pulse.
With SetAnalysis only the following value is possible (with LSA and resolver versions): - 4 : cSignalAnalysis[X]. The [X] array[s] of the spectral analysis data. - 5 : cSignalAnalysisY. The Y array of the spectral analysis data.
enable – True to enable data pattern (default), False to disable.
- Raises:
ValueError – With invalid index number.
- get_data_pattern_data(channel: int, index: int, arr_size: int) ndarray[tuple[Any, ...], dtype[int16]]
Get data from the given data pattern. It must be set first with set_data_pattern.
- Parameters:
channel – The signal number (1 to 8) in case of a WLM with multichannel switch or with double pulse option (MLC). For WLMs without these options 1 should be overhanded.
index – Index number to get the data pattern from. Must be in range [0 .. 5]. See also ‘set_data_pattern’.
arr_size – A batch size for reading data pattern.
- Returns:
Data array from the data pattern.
- Return type:
pattern_array
- Raises:
ValueError – With invalid index number.
- force_unlock() None
Forcefully unlock the remote object.
This unlocks the object, regardless of who owns the lock. This allows you to unlock an object if the locking proxy has been destroyed without unlocking.
Use this with care.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- classmethod get_category() str | None
Return the optional name of the category this object belongs to.
A category name is a free-form string that has no special significance. Its purpose is to distinguish between groups of RPC objects that fulfill similar roles.
- get_name() str
Return the name of this object.
- Returns:
name attribute.
- get_signals() list[SignalDescription]
Return a list of signals that can be published by this object.
- Returns:
List consisting of qmi_signals attributes.
- is_locked() bool
Query if the remote object is locked.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- is_open() bool
Return True if the instrument is open (ready for interaction).
- lock(timeout: float = 0.0, lock_token: str | None = None) bool
Lock the remote object. If timeout is given, try every 0.1s within the given timeout value. The remote object can be locked with an optional custom lock token by giving a string into lock_token keyword argument.
If successful, this proxy is the only proxy that can invoke RPC methods on the remote object; other proxies will receive an “object is locked” response. The return value indicates if the lock was granted; a denied lock means the object was already locked by another proxy.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.
- release_rpc_object() None
Give a warning if the instrument is removed while still open.
- unlock(lock_token: str | None = None) bool
Unlock the remote object.
Without optional parameters, this is only allowed by the proxy that initially locked the object. By giving the lock token as an input parameter, the specific object locked by this token can be unlocked. The return value indicates if the unlocking was successful.
Do not override this stub method in subclasses. It has already been implemented in QMI_RpcProxy.