calamari.plot.plot_scale_tracks#

calamari.plot.plot_scale_tracks(scan, *, sweep_id, signal=None, ax=None, show_errors=False, **style)#

Draw each tracked feature’s location against the smoothing window.

The scale-space view of a scan_smoothing() scan (Witkin’s scale-space picture; see calamari.scales): the swept location on x, the window on y, one marker per window a feature was found at, and a thin line joining one track’s members in window order. The marker is the method’s METHODS marker, and the colour follows the method too. A feature that does not depend on the window is a vertical line through every window; a noise feature is usually a short or wandering one. Persistence and spread read at a glance; significance does not, and is in scan.tracks.

A sign flip is drawn hollow. Tracks are matched without regard to sign, so a curvature extremum that turns from ‘down’ to ‘up’ as the window changes stays one track. Each member whose sign differs from its track’s sign_mode gets a hollow marker, so a track with a steady location but an unsteady sign cannot pass for a steady feature.

Read it for what it is: robustness to an analysis choice, not evidence. Every window sees the same data, so a noise excursion can persist across all of them (see calamari.scales).

Parameters:
  • scan (SmoothingScanResult) – From scan_smoothing().

  • sweep_id (int) – The sweep, as in the scan’s tracks table.

  • signal (str | None) – The searched signal; None takes the sweep’s only one.

  • ax (Axes | None) – Draw into these axes; omitted, a new single-axes figure is created.

  • show_errors (bool) – Draw each member’s location standard error (T_err_K or H_err_T) as a horizontal bar. Off by default: on a sweep with many short noise tracks the bars crowd the panel.

  • **style (Any) – Forwarded to ax.plot for the track lines and markers (markersize=, color= to override the per-method colour, …). A sign-flipped member’s hollow face is always applied.

Return type:

Axes

Returns:

matplotlib.axes.Axes – The axes drawn into, with the declared windows as y-ticks. The first filled markers of each method carry the method’s name as a legend label, and the first hollow ones 'sign differs from its track', for a legend you call.

Raises:

PlotInputError – For a sweep_id or signal the scan did not search, naming those it did, and for axes whose x-label is calamari’s for another swept axis. Every refusal comes before anything is drawn.