calamari.boundary#

Fit an explicit model to selected candidate locations across sweeps.

fit_boundary() fits \(T(H)\) or \(H(T)\) to at most one selected point per sweep, using one detection criterion. The caller supplies the model and interprets whether the selected features represent a physical boundary. Raw sweep data are not fitted jointly.

The result records every sweep, including those without selected points. Predictions for missing points are separate from observations. Diagnostics include HESSE uncertainties, a leave-one-sweep-out jackknife, a covariance-derived one-standard-error band, residuals, pulls and comparisons with caller-listed models.

Several smoothing windows or fitting ranges reuse the same observations; they must not be treated as independent points. Supply analysis-choice uncertainty explicitly through yerr_sys when appropriate. Statistical-only and combined uncertainty fits are reported separately. Mixed criteria are refused because they can locate systematically different positions on the same feature.

Monotonic fitting requires a monotonic parametric model. The fit describes candidate coordinates and does not assign phase labels. calamari.plot.plot_boundary() draws the existing result.

Module attributes

LOW_CHI2_TAIL

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).

BAND_POINTS

Number of held-coordinate values the stored band is evaluated at, evenly spaced across the used points' range.

POINT_COLUMNS

one row per sweep, its held coordinate, the location with its statistical error, and the criterion that placed it.

SWEEP_COLUMNS

one row per sweep of the family.

Functions

fit_boundary

Fit a stated form to one criterion's points, one per sweep, and say how far to trust it.

Classes

BoundaryFit

One stated model fitted to one criterion's points, one per sweep, with its diagnostics.