Synthetic Experiment Suite¶
These guides are working synthetic replacements for first Luxnode lab data. Each scenario generates sample/reference/dark arrays, runs the real Lux algorithms, and renders an interactive Plotly dashboard. Replace the synthetic arrays with Luxnode captures when the hardware is on the bench.
Run every scenario locally:
python -m lux.experiments --list
python -m lux.experiments plant-water-stress --json
python -m lux.experiments --write-docs-data docs/assets/data/synthetic-experiments.json
Use this pattern when real data arrives:
from luxspec import SerialLuxNode
from lux.pipeline import process_absorbance, process_reflectance
with SerialLuxNode("/dev/tty.usbmodem1101") as node:
dark = node.capture("dark")
reference = node.capture("white") # or "blank" for cuvette absorbance
sample = node.capture("raw")
# Reflectance guide:
processed = process_reflectance(sample.wavelengths_nm, sample.counts, reference.counts, dark.counts)
# Absorbance guide:
processed = process_absorbance(sample.wavelengths_nm, sample.counts, reference.counts, dark.counts)
The dashboards below are intentionally deterministic. If an incoming real scan breaks a synthetic expectation, keep the same pipeline but update calibration, integration time, reference geometry, and local spectral libraries before changing the science logic.
Experiment Guides¶
| Guide | Module | What it proves |
|---|---|---|
| Plant water stress | Plants | Reflectance correction, red edge, stress scoring, plant library search. |
| Leaf chlorophyll proxy | Plants | Chlorophyll loss and nitrogen-deficiency style reflectance. |
| Plant pigment extract | Plants / molecules | VIS cuvette absorbance, peak ID, pigment matching. |
| Nitrate UV assay | UV chemistry | Quartz cuvette UV correction, nitrate matching, A220 correction. |
| Caffeine and polyphenols | Food / UV | Molecule matching and concentration proxies. |
| Beer color and haze | Brewing | SRM/EBC and haze proxies. |
| Kombucha fermentation | Kombucha | Color, turbidity, fermentation trend features. |
| Hematite mineral ID | Minerals | VIS mineral database matching. |
| Clay and iron mixture | Minerals | Future VIS/NIR mixture fitting and hydration proxy. |
| Element emission | Elements | Peak picking against an element line database. |
| Stellar classification | Astronomy | Telescope adapter spectra, Balmer features, and stellar template matching. |
| UV mercury calibration | Calibration | Known-line wavelength calibration and residuals. |
| TDDFT riboflavin | Simulation | Broadened oscillator-strength comparison against synthetic TDDFT spectra. |