calamari.scales.SmoothingScanResult#
- class calamari.scales.SmoothingScanResult(results, members, tracks, params=dict())#
Bases:
objectOne 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:
- members#
One row per (track, window) hit (
MEMBER_COLUMNS, pluschain_idandchain_significancewhen the scan was linked).candidate_idaddresses the row inresults[window].- Type:
- tracks#
One row per track (
TRACK_COLUMNS, pluschain_significance_minandchain_significance_medianwhen linked).n_windowscounts the distinct point counts the declared windows resolved to on that sweep and signal, andn_presentthe distinct ones the track appears in, sopersistence = n_present / n_windowsis not inflated by two windows that clamped to one analysis. The location, sign and significance summaries are taken over those distinct windows too.- Type:
- params#
The recipe:
windows(as given) andwindows_sorted, the two tracking tolerances,track_by,detect_kwargs,link,smooth_points(per sweep and signal, the point count each window resolved to, andn_windows),resolved_together(the windows that clamped to one count, as warned), andcalamari_version.- Type:
- 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:
- Returns:
calamari.transitions.TransitionResult– That window’s result, asdetect_transitions_all()(andlink(), if the scan was linked) returned it.- Raises:
SmoothingSensitivityError – If
windowis 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:
- Return type:
- Returns:
calamari.transitions.TransitionResult– Full reference detection withsmoothing_*diagnostics, asensitivity_audittable, andparams['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_windowsis the searched count;smoothing_n_presentandsmoothing_persistencedescribe support.smoothing_sign_consistency,smoothing_T_K_spread/smoothing_H_T_spread,smoothing_interval_overlapandsmoothing_edge_anydescribe qualified members. Theirraw_counterparts describe all members, e.g.smoothing_raw_T_K_spread.