BossNet¶
BossNet is a convolutional neural network pipeline that estimates stellar parameters from BOSS optical spectra. It shares the same ResNet architecture as APOGEENet but is trained on optical spectral data and additionally predicts radial velocity.
What it does¶
BossNet predicts four quantities from an input BOSS spectrum:
Effective temperature (Teff)
Surface gravity (log g)
Metallicity ([Fe/H])
Radial velocity (v_r)
It operates on both visit-level and combined BOSS spectra (BossVisitSpectrum or BossCombinedSpectrum).
How it works¶
Network architecture¶
BossNet uses the same deep residual convolutional neural network as APOGEENet, with an additional output for radial velocity. The architecture consists of:
Positional encoding – a 1D positional encoding is appended to the flux channel.
Initial convolution block – a 1D convolutional block (kernel size 30) mapping 2 input channels to 4 output channels.
Four residual blocks – each doubling the channel count (4 -> 8 -> 16 -> 32 -> 64), using kernel size 30.
Adaptive average pooling – reduces the spatial dimension to 1024.
Fully connected layers – six linear blocks of dimension 1024, followed by a final linear layer outputting 4 values (log g, log Teff, [Fe/H], radial velocity).
Preprocessing¶
BOSS spectra undergo several preprocessing steps:
Wavelength interpolation: The variable-resolution BOSS spectra are interpolated onto a uniform linear wavelength grid spanning 3,800 – 8,900 Angstroms with 3,900 pixels.
Error conversion: Inverse variance is converted to error, with handling for infinite/NaN values. Errors are clipped at 5 times the median non-infinite error.
Log scaling: The flux is log-transformed (
log(clip(flux, min=1e-6))) and clipped at the 95th percentile + 1 to remove outliers.
Uncertainty estimation¶
Uncertainties are estimated via Monte Carlo noise injection:
num_uncertainty_draws(default: 20) noise realizations are generated.Each noised spectrum is interpolated and log-scaled.
The standard deviation of the resulting predictions gives the uncertainty.
Output conversion¶
The network predicts log(Teff) and log(g) in a normalized space. These are unnormalized and converted:
teff = 10^(log_Teff)e_teff = 10^(log_Teff) * log_Teff_std * ln(10)
Radial velocity and its uncertainty are returned directly after unnormalization.
Output fields¶
Field |
Type |
Description |
|---|---|---|
|
float |
Effective temperature (K) |
|
float |
Uncertainty in Teff (K) |
|
float |
Surface gravity (log10(cm/s^2)) |
|
float |
Uncertainty in log g |
|
float |
Metallicity [Fe/H] (dex) |
|
float |
Uncertainty in [Fe/H] (dex) |
|
float |
Radial velocity (km/s) as estimated by BossNet |
|
float |
Uncertainty in radial velocity (km/s) |
|
bitmask |
Bitfield encoding quality flags |
Flags¶
Flag |
Bit |
Description |
|---|---|---|
|
2^0 |
Exception occurred at runtime |
|
2^1 |
Teff is outside the range 1,700 – 100,000 K |
|
2^2 |
log g is outside the range -1 to 10 |
|
2^3 |
Teff < 3,200 K, or log g > 5, or [Fe/H] is outside -4 to +2 |
|
2^4 |
[Fe/H] may be suspicious for stars with Teff < 3,900 K and 3 < log g < 6 |
Summary flags¶
flag_warn: Set whenflag_unreliable_fe_horflag_suspicious_fe_his set.flag_bad: Set when any offlag_unreliable_teff,flag_unreliable_logg,flag_unreliable_fe_h, orflag_runtime_exceptionis set.
Caveats¶
BossNet uses a wider log g validity range (-1 to 10) than APOGEENet (-1 to 6), reflecting the different stellar populations observed in BOSS optical spectra.
The radial velocity field is named
bn_v_r(rather thanv_r) to distinguish it from radial velocities measured by other methods.The
flag_suspicious_fe_hflag is specific to BossNet and warns about potentially unreliable [Fe/H] values for cool dwarf/subgiant stars (Teff < 3,900 K, 3 < log g < 6), where optical metallicity estimates may be less reliable.BOSS spectra are interpolated from their native (variable) wavelength grid onto a uniform linear grid before processing. This interpolation step may introduce small systematic effects.
GPU acceleration is used automatically when available.
If no valid Teff can be predicted (e.g., due to a failed inference), the
flag_runtime_exceptionflag is automatically set.