Getting Started¶
Repository Setup¶
git clone https://github.com/su3-labs/lux.git
cd lux
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,serial]"
python -m pytest -q
python examples/analyze_demo.py
Package Names¶
The planned PyPI distribution name is luxspec. The import surface is:
import luxspec # stable user SDK
import lux # lower-level algorithm package
Use luxspec in notebooks, apps, and scripts. Use lux when working directly
on preprocessing, peak detection, matching, and module internals.
Device Connection Options¶
V0 supports a serial JSON-line protocol. Later firmware can expose the same frame schema over Wi-Fi, Bluetooth bridges, or Lux Cloud.
from luxspec import SerialLuxNode
with SerialLuxNode("/dev/tty.usbmodem1101") as node:
dark = node.capture("dark")
white = node.capture("white")
raw = node.capture("raw")
Core Measurement Cycle¶
- Warm the spectrometer and illumination path.
- Capture dark with illumination off and the optical path closed.
- Capture a white/reference or blank spectrum.
- Capture sample spectra.
- Store the raw frame, dark frame, reference frame, telemetry, and algorithm versions together.