Skip to content

Stellar Spectral Classification

This guide simulates a bright A-type star measured through the Luxnode telescope adapter. It demonstrates dark/flat correction, Balmer absorption metrics, telluric quality checks, and template matching against a small stellar library.

python -m lux.experiments stellar-classification --json
from lux.modules.astronomy import classify_stellar_spectrum
from lux.pipeline import process_reflectance

processed = process_reflectance(wavelengths_nm, star_counts, flat_counts, dark_counts)
classification = classify_stellar_spectrum(processed.calibrated)

print(classification.metrics.probable_spectral_class)
print(classification.matches[0].name)

For the first physical run, use a bright known star as the control target and keep the same integration time, slit focus, and adapter geometry for unknown stars. Replace the synthetic star_counts, flat_counts, and dark_counts arrays with Luxnode telemetry.