pub const HOT_PIXEL_K_MAD: f64 = 6.0;Expand description
Default MAD multiplier for the global (stage-1) cut of
detect_hot_pixels.
The one-sided Gaussian tail at 6 robust σ is P(Z > 6) ≈ 9.9e-10, i.e. ~2.6e-4 expected false flags on a full 512×512 frame (262 144 pixels) — on a unimodal image the screen essentially never rejects a statistically plausible pixel, while a railed pixel sits tens of robust σ above any plausible median.
On a bimodal image the global cut alone is not trustworthy: when the
darker population holds the median (a sample covering >50 % of the FOV,
or an aperture-limited open beam), the MAD reflects only the dark
population’s internal spread, and every bright-region pixel lands
above med + k·MAD. detect_hot_pixels therefore never flags on the
global cut alone — the local-neighborhood confirmation
(HOT_LOCAL_FACTOR) must also pass.