Astronomy Module¶
The astronomy module analyzes dark/flat-corrected telescope spectra from the VIS Luxnode head. It is designed for bright stars and educational field use: Balmer absorption features, coarse color temperature, and template matching against broadened stellar spectra.
from lux.modules.astronomy import classify_stellar_spectrum
result = classify_stellar_spectrum(relative_intensity_spectrum, top_k=3)
print(result.metrics.probable_spectral_class)
for match in result.matches:
print(match.name, match.score)
V0 Hardware Assumption¶
- C12880MA VIS/NIR detector path.
- Passive telescope/slit or fiber adapter.
- Dark capture with the aperture capped.
- Flat/reference capture from a known calibration source or known bright star.
- No solar observation unless a certified solar filter is installed upstream.
Current Algorithms¶
- blue/red continuum ratio
- calibrated or default effective-temperature proxy
- H-alpha, H-beta, and H-gamma absorption depths
- Balmer absorption index
- telluric oxygen-band quality flag
- broadened stellar-template matching
Calibration And Readiness Contract¶
The V0 astronomy workflow is ready for prototype captures when these conditions pass:
- dark frame captured with the telescope adapter capped
- flat/reference frame captured with the same focus and integration time
- known bright-star control matches the expected stellar template
- no saturated detector pixels in the star frame
- telluric oxygen-band flag reviewed before comparing different nights
Use a known-star calibration to tune the color-temperature proxy for your telescope and slit geometry:
from lux.modules.astronomy import (
classify_stellar_spectrum,
fit_color_temperature_calibration,
)
calibration = fit_color_temperature_calibration(
ratios=[1.9, 1.2, 0.55],
temperatures_k=[9550, 5770, 3400],
)
result = classify_stellar_spectrum(
relative_intensity_spectrum,
color_calibration=calibration,
)