Metadata-Version: 2.5
Name: plesty-thorlabs-powermeter
Version: 0.1.0
Summary: A plesty device for the Thorlabs PM-series optical power and energy meters.
Author-email: Yunshuang Yuan <yuanyunshuang@gmail.com>
Maintainer-email: Plesty Development Team <plesty.dev@example.com>
License-Expression: LGPL-3.0-or-later
License-File: COPYING
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: plesty-lib>=0.4.0
Description-Content-Type: text/markdown

# Plesty Thorlabs Power Meter Device

One Plesty device module for the Thorlabs PM-series optical power and energy
meters — PM100D, PM100A, PM100USB, PM160/PM160T, PM200 and PM400. They share a
single SCPI command set, so the module implements it once and reads the console
and the fitted sensor head from the instrument at connect.

## Installation

```bash
git clone https://gitlab.com/plesty/hub/devices/thorlab/powermeter.git
cd powermeter
uv sync
```

## Run as a TCP server

```bash
uv run python -m plesty.thorlabs_powermeter --tcp-port 5555
```

The default address matches any Thorlabs USB-TMC console; pass
`-a "USB0::0x1313::0x8078::<serial>::INSTR"` to name one unit.

Without hardware, `--mock` serves an in-memory SCPI simulator, optionally as a
named console and head:

```bash
uv run python -m plesty.thorlabs_powermeter --mock PM400:S401C
```

See `docs/index.md` for supported consoles, how to add one, and troubleshooting.
