Skip to main content

HOT_LOCAL_FACTOR

Constant HOT_LOCAL_FACTOR 

Source
pub const HOT_LOCAL_FACTOR: f64 = 10.0;
Expand description

Local-neighborhood confirmation factor (stage 2) of detect_hot_pixels.

A pixel that passes the global cut is flagged only if its total also exceeds HOT_LOCAL_FACTOR × the median total of its available live 8-neighbors. The factor separates detector point defects from scene structure:

  • A railed/runaway pixel is spatially isolated and typically ≥100× its neighbors, so it clears 10× with a wide margin.
  • Adjacent-pixel scene gradients (beam profile, sample absorption) are ≤2–3×; even directly across a sharp sample edge only one ring of neighbors is mixed, and the neighbor median stays on the pixel’s own side of the edge.
  • A fully-railed 1-px row/column still leaves each railed pixel with ≥5 normal neighbors of 8, so the neighbor median stays normal and the line IS caught in a single pass. Railed CLUSTERS ≥2 px wide are caught by the stage-2 fixpoint erosion — see the “Fixpoint erosion of railed clusters” section of detect_hot_pixels.

Width-1 limitation (accepted trade-off): a 1-px-wide bright scene line at ≥HOT_LOCAL_FACTOR× local contrast is spatially indistinguishable from a railed line and IS masked. Contiguous bright regions ≥2 px wide are safe (their boundary pixels keep a same-side neighbor median, so the erosion never seeds — see detect_hot_pixels, “Why bright scene regions never erode”). Real scene features on VENUS are PSF-blurred over ≥2 px, so ≥10× single-pixel scene contrast is physically rare; masking it is the accepted price for catching railed rows/columns.