Plesty Lightfield Spectrometer Device
A Plesty device for the Princeton Instruments LightField spectrometer. It
drives LightField through its .NET automation API via pythonnet, so the
server runs on the Windows PC the camera is attached to.
Full documentation: docs/index.md.
Setup the server
On the Windows PC where LightField is installed (camera via USB — PIXIS — or
GigE — PyLoN-IR), close all LightField apps: LightField.exe,
AddInProcess.exe and the LightField Firmware Assistant. Then in a
Terminal/PowerShell:
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.
Starting unattended
Under a supervisor or the bench app there is nobody to answer the
confirmation before an open LightField session is closed, so it refuses and
the server does not start. Pass --close-lightfield (or set
DEVICE_CLOSE_LIGHTFIELD=1) to close it and discard whatever it has not
saved. The same flag allows ending the LightField Firmware Assistant, which
holds the camera and usually ignores a polite close — check no firmware write
is in progress first, since interrupting one can leave the camera unusable.
Long runs
LightField's AddInProcess keeps a share of every acquisition and never
releases it: about 0.21 MB per acquisition plus 0.037 MB per second of
acquiring, measured on the bench. Idling is free and so are API calls — only
acquiring costs — but overnight that is gigabytes, and no exposure setting
avoids it.
Nothing in this process can free another process's heap, so the server
restarts the LightField session instead, between acquisitions, once the host
passes DEVICE_RECYCLE_CEILING_MB (default 1024 MB, 0 to disable). A
restart costs about 22 s and the experiment's settings survive it. See
Long runs and the automation host in docs/index.md.
Tests
uv run pytest # hardware-free; what CI runs
uv run python tests/field_test.py # the instrument, in-process
uv run python tests/field_test_client.py # the instrument over ZMQ
The field tests need hardware and are run by hand — the host tier on the LightField PC, the client tier from a machine on the instrument network, against a running server. Run the host tier first; the client tier reads its report to know what to exercise.
Regenerate the manuals
uv run plesty manual generate . --with-pdf
Metadata
Release files for plesty-lightfield-spectrometer 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plesty_lightfield_spectrometer-0.2.1.tar.gz | 223.6 kB | Without provenance | Details for plesty_lightfield_spectrometer-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plesty_lightfield_spectrometer-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for plesty_lightfield_spectrometer-0.2.1-py3-none-any.whl |
Total release size: 287.4 kB
Release files / plesty_lightfield_spectrometer-0.2.1.tar.gz
| Download URL | plesty_lightfield_spectrometer-0.2.1.tar.gz |
|---|---|
| Size | 223.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12a0bbef106a116a64c9023e73c905cf9e633f4d452116160cf67fa2077372d7
|
|
BLAKE2b-256 checksum How to use checksums |
eb2ea806041ae05e964ec72fe8a6fac33c169d9b576f861fdd3dae05a3bec8e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / plesty_lightfield_spectrometer-0.2.1-py3-none-any.whl
| Download URL | plesty_lightfield_spectrometer-0.2.1-py3-none-any.whl |
|---|---|
| Size | 63.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
344446a4213f997994b05a4d7da8031b487b6163feff376af6925c1dde78d726
|
|
BLAKE2b-256 checksum How to use checksums |
083aec67503736d7b5f4c732922715b02edd16800821f6013073782d8c8841b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for plesty-lightfield-spectrometer 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.