Skip to content

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

  1. Warm the spectrometer and illumination path.
  2. Capture dark with illumination off and the optical path closed.
  3. Capture a white/reference or blank spectrum.
  4. Capture sample spectra.
  5. Store the raw frame, dark frame, reference frame, telemetry, and algorithm versions together.