Python client for the HighFinesse WS/6-200 wavemeter (wlmData wrapper).
Project description
ws6-200-wvm
Python client for the HighFinesse WS/6-200 wavemeter (and other WS/6
variants that share the same wlmData library).
The HighFinesse stack is a shared-memory client/server: the vendor's
wlm_ws6 application owns the USB device and publishes measurements
into shared memory; this package loads wlmData.dll (Windows) or
libwlmData.so (Linux) via ctypes and reads from that shared memory.
Reads are microsecond-scale memory operations.
Constraints:
- The vendor library is x86_64 only — this package will not work on a Raspberry Pi / ARM host. Run on a Windows or Linux x86_64 PC attached to the wavemeter over USB.
- The vendor server (
wlm_ws6.exe) must be running locally. On Windows, this package can autostart it for you (default).
Install
pip install ws6-200-wvm
or with uv:
uv add ws6-200-wvm
Prerequisites
-
HighFinesse "Wavelength Meter" application installed from the USB stick that shipped with your WS6. The installer is calibration-keyed to your unit's serial, so use the one for your device. It places
wlmData.dllunderC:\Windows\System32\andwlm_ws6.exesomewhere on PATH.Linux equivalent: request the Linux bundle from HighFinesse support; it installs
libwlmData.soand awlm_ws6daemon binary. -
USB connection from the host to the WS6, and the wavemeter powered on. First time, run the vendor "Wavelength Meter" GUI to confirm it sees the device.
If you are integrating this package into a larger application and need to write an adapter, see docs/wrapping.md.
Quickstart
from ws6200_wvm import Ws6200
with Ws6200(channel=1) as wm:
print(wm.idn)
print(wm.measure_frequency_thz(), "THz")
print(wm.measure_wavelength_nm(), "nm")
Or without the context manager:
wm = Ws6200(channel=1)
wm.connect()
try:
freq_thz = wm.measure_frequency_thz()
finally:
wm.disconnect()
Configuration
Ws6200Config is a pydantic model that you can populate from YAML /
JSON / env vars and call .make() on to get a driver:
from ws6200_wvm import Ws6200Config
cfg = Ws6200Config(channel=1, autostart_server=True, start_timeout_s=10.0)
wm = cfg.make()
Fields:
| field | default | meaning |
|---|---|---|
channel |
1 |
1-indexed switcher channel. |
dll_path |
None |
Override path to wlmData.dll / libwlmData.so. Auto-detected if unset. |
autostart_server |
True |
On Windows, launch wlm_ws6.exe via ControlWLMEx if not running. |
start_timeout_s |
10.0 |
Seconds to wait for wlm_ws6 to come up. |
CLI
A console script ws6200-wvm is installed for first-install smoke
tests:
ws6200-wvm measure # one reading, then exit
ws6200-wvm measure --watch --interval 0.5
ws6200-wvm measure --channel 2 --dll-path "C:\path\to\wlmData.dll"
Errors
Library / setup problems raise RuntimeError:
- "could not load HighFinesse wlmData library …" — install the vendor
software, or pass
dll_path=...to point at it. - "HighFinesse wlm server is not running …" — start
wlm_ws6.exemanually, or passautostart_server=Trueon Windows.
Wavemeter-reported measurement errors raise WavemeterError with a
label from wlmData.h:
| label | meaning |
|---|---|
noval |
No measurement available yet |
nosig |
No input signal |
badsig |
Signal present but uncomputable |
under |
Underexposed |
over |
Overexposed |
nowlm |
No wavemeter server running |
outofrange |
Outside calibrated range |
noresponse |
|
div0 |
|
outofresolution |
NotConnectedError (subclass of WavemeterError) is raised if you
call a measure_* method before connect().
Calibration
HighFinesse units use an internal reference but the factory absolute calibration drifts over time. Check the recommendation that came with your unit (typically 12–24 months) and send it back in cycle to keep the 200 MHz absolute spec.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ws6_200_wvm-0.2.0.tar.gz.
File metadata
- Download URL: ws6_200_wvm-0.2.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123aff2fe22c54a023aec87fd0459974735de5a836fdb909c61be07edc67501e
|
|
| MD5 |
d7d100fd0922086cfde373b133c14695
|
|
| BLAKE2b-256 |
9457792157ea1c0f7944ad4b3dbbc96eb97d301be25b1cb336e97178782d8310
|
File details
Details for the file ws6_200_wvm-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ws6_200_wvm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b42a822bef4c578fd480aa739f927ea4fe70871d07f53995fbc5d74d0bb5092
|
|
| MD5 |
9b6f8b04404e3cc5485a9c48c454fcfc
|
|
| BLAKE2b-256 |
5f0bda9c455dfc8230add31d05460ab65ae06f7613c487c529663a1d5c8ddc32
|