calamari.quality.CONTINUITY_THRESHOLD#
- calamari.quality.CONTINUITY_THRESHOLD = 20.0#
A point is flagged when its departure from a straight line through its neighbours (fitted against the swept quantity) exceeds this multiple of the larger of (a) the neighbours’ own disorder about that line and (b) the series-wide robust noise (1.4826 x MAD of every departure). A line absorbs a smooth slope. Extended steps or cusps can also raise neighbour disorder, whereas an isolated departure on a smooth response can score strongly. Scores depend on sampling, noise and feature shape; no fixed range separates physical features from defective readings.
Empirical working threshold: emphasise departures from a locally smooth response without interpreting the score as a probability. It is not a calibrated false-alarm rate or a guarantee that every flagged point is bad. Inspect scores and response shape; record any override.