calamari.transitions#
Phase-transition candidate detection for 1-D magnetometry sweeps.
Search DC moment or AC susceptibility on a single T- or H-scan with
detect_transitions(), or process a campaign with detect_transitions_all().
find_transitions() accepts arrays directly. Candidates describe signal features;
identifying a phase transition requires the caller’s scientific interpretation.
Methods and defaults#
The METHODS registry contains criterion definitions and citations:
'peak': maxima and minima of the smoothed signal.'derivative': extrema of the signed first derivative.'kink': extrema of the second derivative, for changes of slope.'onset': intersection of a baseline and the steepest-slope tangent.'fisher': extrema of d(yT)/dT, subject to the susceptibility assumptions documented byfind_transitions(). Fisher candidates remain separate from other criteria when grouping detections.
H-scans default to 'peak' for susceptibility and 'derivative' for moment.
T-scans run both. Kink, onset and Fisher searches are opt-in because they assume
particular feature shapes or response interpretations. Smoothing affects each
criterion’s location; see find_transitions() for grouping and error conventions.
Noise and significance#
Detection uses a permissive prominence floor. significance normalises prominence
by the noise of the smoothed representation, with a sweep-length correction. It is
not a calibrated z-score or false-alarm probability.
noise='auto' prefers usable instrument errors, otherwise a second-difference
scatter estimate. It warns when instrument errors exceed the scatter estimate by
NOISE_RATIO_WARN. Explicit 'instrument', 'scatter' or positive sigma
choices are available. Both estimates and the resolved choice are recorded.
Result transformations#
All operations are deterministic for their inputs and settings.
TransitionResult.robust() filters by declared diagnostic thresholds.
TransitionResult.link() describes chains across neighbouring sweeps; combined
chain scores remain diagnostics. TransitionResult.select() records an explicit
criterion, sign and swept-axis window, retaining at most one candidate per sweep.
TransitionResult.reconcile() compares selected T- and H-scan boundaries by
interpolation, without extrapolation or implicit concordance tolerances.
Linking and reconciliation describe results without dropping points. See
TransitionResult for transformation order and recorded settings.
Module attributes
Detection identities, display markers and scientific/statistical citations. |
|
Reporting priority within a grouped feature; Fisher candidates remain separate. |
|
Permissive prominence floor, as a fraction of the signal's peak-to-peak range. |
|
Uncalibrated diagnostic threshold used by |
|
Instrument/scatter noise ratio above which auto noise selection warns. |
|
Canonical measurement-level candidate columns, including stable sweep identity. |
|
Canonical constituent-detection columns, linked to their candidate by ID. |
|
Chain summaries; their significance statistic is not a calibrated probability. |
|
Candidate fields that must match within a linked chain, besides the swept axis. |
Functions
Detect transition candidates in one Measurement's sweep. |
|
Detect over many sweeps, collecting failures instead of hiding them. |
|
Detect transition candidates in one 1-D sweep given as arrays. |
|
Noise-robust Savitzky-Golay derivative of |
Classes
One literature citation backing a detection method. |
|
Identity card for one detection method. |
|
Detected transition candidates plus the evidence and the recipe. |