calamari.transitions.detect_transitions_all#
- calamari.transitions.detect_transitions_all(measurements, *, link=None, robust=None, smooth_window=None, **kwargs)#
Detect over many sweeps, collecting failures instead of hiding them.
Accepts Measurements and/or the
(T_K, Measurement)pairs thatcalamari.sweeps.split_isotherms()returns (the pair’s measurement is used; its own columns carry the coordinates). A sweep that is refused (mixed scan kind, drifting fixed parameter, multi-frequency withoutfrequency=, …) or fails lands inskippedas(path, reason)– an empty table with a populatedskippedis “everything failed”, not “no transitions”.Every row carries
sweep_id, the sweep’s position inmeasurements, counted over every entry including the skipped ones: an id therefore names the same sweep however many others fail, and the gaps are listed inparams['skipped_sweep_ids'](parallel toskipped).measurement_filecannot do this job, because the isothermssplit_isotherms()cuts from one file all carry that file’s path. Eachparams['per_sweep']entry records itssweep_idtoo, andcurvesis keyed by(sweep_id, signal)for the same reason; read a sweep’s curves withTransitionResult.curve().Adds a
probecolumn ('AC'/'DC', from each row’s signal).link=androbust=(mappings ofTransitionResult.link()andTransitionResult.robust()keyword arguments) apply those steps in the same call for pipeline ergonomics; the settings are recorded identically either way. The order is link then robust, which is the only useful one: gating on a chain statistic requires the chains to exist, and this is the entry point where a whole family of sweeps is in hand – the only place cross-sweep recurrence is visible at all.**kwargsforward todetect_transitions().- Parameters:
smooth_window (
float|Callable[[Measurement],float|None] |None) – A single physical-units window applied to every sweep – the historical behaviour – may need adjustment for sweeps with different sampling densities, noise or physical feature widths. Pass a callablef(measurement) -> float | Noneinstead and it is invoked per sweep (the pair’sMeasurementfor asplit_isothermsentry), so a caller can key the window off e.g. the sweep’s own point count or spacing. An exception from the callable, or a return value that is not a positive finite number orNone, is treated as that sweep’s failure and recorded inskipped(never raised out of the batch, and never silently substituted). What was actually passed todetect_transitions()for every searched sweep is recorded inparams['per_sweep'], inresultsorder, so the resolved windows remain available without retaining the callable. Each entry’sper_signalrecords include any resolved moment source; original inputs and external preprocessing must still be retained.**kwargs – Forwarded to
detect_transitions(). Shared configuration is checked before consuming any sweeps, including an empty batch. Invalid methods, noise, smoothing or selection settings raise rather than skipping every sweep. Data-dependent refusals remain inskipped; each sweep is then screened on its own (so'warn'warns once per sweep with a flagged point in its search), and each sweep’sparams['outliers']is copied into itsper_sweepentry – wherescreenedshows which sweeps went through unscreened becausequality()could not score them. Under'drop'such a sweep is refused intoskippedinstead. AQualityReportdescribes one file, so in a batch it is refused – intoskipped– by every sweep it does not describe; pass a mode instead.
- Return type: