Metadata-Version: 2.5
Name: plesty-lightfield-spectrometer
Version: 0.1.0
Summary: API for the Lightfield Spectrometer Device.
Author-email: Yunshuang Yuan <yunshuang.yuan@fkp.uni-hannover.de>
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.3.4
Requires-Dist: pythonnet>=3.0.0
Description-Content-Type: text/markdown

# Plesty Lightfield Spectrometer Device

## Setup the server

On the Windows PC where LightField is installed (camera via USB — PIXIS — or
GigE — PyLoN-IR), close all LightField apps, including `LightField.exe` and
`AddInProcess.exe`. Then in a Terminal/PowerShell:

```bat
git clone https://gitlab.com/plesty/hub/devices/princeton_instruments/lightfield_spectrometer.git
cd lightfield_spectrometer
uv sync
copy .env.example .env
:: edit .env — at least DEVICE_DATA_PATH (where frames go, steerable by clients)
uv run python -m plesty.lightfield_spectrometer --tcp-port 5555
```

Run the server from a **normal (non-elevated) desktop shell** — not over
SSH: Windows OpenSSH gives administrator accounts an elevated token, and
LightField's automation IPC refuses mismatched privilege levels. The
preflight warns when it detects this.

A GigE camera needs no configuration: the preflight finds the link-local
neighbour on the camera NIC, verifies it with a ping, and pins it to `.env`
as `CAMERA_HOST`.

## How to regenerate manuals
```bash
cd project_root
.\.venv\Scripts\activate
plesty manual generate . --with-pdf
```

## Run pytest
```bash
cd project_root
.\.venv\Scripts\activate
python -m pytest -v
```
