calamari.scales.SmoothingScanResult#

class calamari.scales.SmoothingScanResult(results, members, tracks, params=dict())#

Bases: object

One detection per declared smoothing window, and each feature tracked across them.

A description, like TransitionResult.link: nothing is dropped, and nothing here is a verdict. Read the module docstring before quoting anything from it – persistence is robustness to an analysis choice, not evidence, and the per-window significances must never be combined.

results#

Every window’s full result, keyed by the window (in the swept axis’s units), in ascending order. Each carries its own params, so any window can be inspected, filtered or plotted exactly as if it had been run alone. at() is the checked lookup.

Type:

dict of float to calamari.transitions.TransitionResult

members#

One row per (track, window) hit (MEMBER_COLUMNS, plus chain_id and chain_significance when the scan was linked). candidate_id addresses the row in results[window].

Type:

pandas.DataFrame

tracks#

One row per track (TRACK_COLUMNS, plus chain_significance_min and chain_significance_median when linked). n_windows counts the distinct point counts the declared windows resolved to on that sweep and signal, and n_present the distinct ones the track appears in, so persistence = n_present / n_windows is not inflated by two windows that clamped to one analysis. The location, sign and significance summaries are taken over those distinct windows too.

Type:

pandas.DataFrame

params#

The recipe: windows (as given) and windows_sorted, the two tracking tolerances, track_by, detect_kwargs, link, smooth_points (per sweep and signal, the point count each window resolved to, and n_windows), resolved_together (the windows that clamped to one count, as warned), and calamari_version.

Type:

dict

at(window)#

The full detection at one declared window.

An exact lookup, not a nearest match: a window that was not declared was not run, and handing back a neighbour would pass off one analysis as another.

Parameters:

window (float) – One of the declared windows, in the swept axis’s units.

Return type:

TransitionResult

Returns:

calamari.transitions.TransitionResult – That window’s result, as detect_transitions_all() (and link(), if the scan was linked) returned it.

Raises:

SmoothingSensitivityError – If window is not one of the declared windows, naming them.

reference(window, *, min_member_significance=None)#

Attach sensitivity to native reference candidates without moving them.

Only native (window, candidate_id) membership associates a track. A missing reference detection is never manufactured. Both unqualified and significance-qualified summaries count distinct resolved point counts once. No new filtering occurs; any recorded per-window filters are retained.

Parameters:
  • window (float) – An exactly declared reference window, as for at().

  • min_member_significance (float | None) – Non-negative finite floor for members used by sensitivity gates. None includes every member. This is an analysis choice, not a combination of the correlated per-window significances.

Return type:

TransitionResult

Returns:

calamari.transitions.TransitionResult – Full reference detection with smoothing_* diagnostics, a sensitivity_audit table, and params['smoothing'] containing the scan recipe, all members, tracks and per-window detections. all() retains this description; link() remains independent. Sweep/signals searched at fewer than three distinct representations are explicitly unassessed, as are missing tracks and empty qualified member sets. smoothing_n_windows is the searched count; smoothing_n_present and smoothing_persistence describe support. smoothing_sign_consistency, smoothing_T_K_spread / smoothing_H_T_spread, smoothing_interval_overlap and smoothing_edge_any describe qualified members. Their raw_ counterparts describe all members, e.g. smoothing_raw_T_K_spread.