calamari.boundary.LOW_CHI2_TAIL#
- calamari.boundary.LOW_CHI2_TAIL = 0.0013498980316300933#
Lower-tail probability of the chi-squared distribution below which the scatter is flagged as too small for the stated errors (
BoundaryFit.scatter_below_errors). The value is Phi(-3), the one-sided tail of a 3-sigma Gaussian excursion, about 0.00135: the flag is a claim that the stated errors are implausible, and 3 sigma is the level at which calamari’s neighbours in physics treat a deviation as evidence rather than a fluctuation. With honest errors it fires in 0.135 % of fits, whatever the degrees of freedom, because it is read off the chi-squared distribution for that fit’s own dof rather than off chi2/dof, whose spread depends on dof (with 2 dof, chi2/dof below 0.1 happens 10 % of the time by chance alone). It was chosen before looking at any fit and is not tuned; it warns and gates nothing.