Skip to content

radiens_qc.plot_quality

Render the metrics a :class:~radiens_qc.report.QualityReport carries.

Site maps, per-channel profiles, channel x window heatmaps and whole-recording trends -- one module per kind of thing being drawn, beside :mod:radiens_qc.plot_raw, :mod:radiens_qc.plot_events and :mod:radiens_qc.plot_units. These are the figures a saved report directory is enough to draw; the other three need a live recording.

Every function here is pure: it builds and returns matplotlib Figure objects and never touches the filesystem, so callers keep control of where figures go (a report folder, a lab notebook, a temp viewer). :mod:radiens_qc.persist is the only module that writes them.

Figures are constructed directly from :class:matplotlib.figure.Figure rather than through pyplot, so nothing is registered in pyplot's global figure manager (returned figures cannot leak) and no interactive backend is required.

Classes

Functions:

plot_channel_profiles

plot_channel_profiles(report)

Every site's SNR, event amplitude, noise floor and event rate, one row per site.

Bars carry the integrity tier rather than event detection, because integrity is the axis with a severity ordering. A shared row order is what lets an unremarkable SNR be read as a weak signal or a large noise floor.

plot_metric_over_time

plot_metric_over_time(report, metric, *, smooth_sec=None)

One channel x window heatmap, rows in depth order.

metric names one of the report's metrics, and only those with a color scale defined can be drawn -- :data:~radiens_qc.figures.FIGURES holds one entry per such metric. smooth_sec pins the Gaussian kernel along time, in seconds; the default sizes it from the duration drawn (see :func:~radiens_qc._smooth.time_sigma_sec). A pinned width narrower than the report's window is widened to it -- the windows are what the metric was measured over, so nothing finer is there to draw -- and 0 draws the image window for window. Either way the time axis names the width applied.

Raises:

Type Description
KeyError

If no heatmap scale is defined for metric.

plot_signal_integrity

plot_signal_integrity(report, *, smooth_sec=None)

Artifact and detector saturation over time, as two stacked channel x window rows.

One figure rather than two because the pair is read together: a burst of peak excursion with no rise in in-event samples is an artifact the detector rode out, while the two rising together is the detector firing on it. A shared x-axis, so a band in one panel lines up with the same instant in the other.

smooth_sec pins the Gaussian kernel along time, in seconds; the default sizes it from the duration drawn. A pinned width narrower than the report's window is widened to it, and 0 draws both rows window for window.

plot_site_maps

plot_site_maps(report)

SNR, noise floor, event rate and event amplitude at each site, on the probe's lattice.

One figure rather than four: the maps share a row axis, so reading a site's four values off the same height is the point of drawing them together. Sized from the site lattice, so a two-column probe yields narrow ribbons and a planar array wide panels, at the same width per site.

plot_stability

plot_stability(report, *, smooth_sec=None)

Every array-wide metric over time, each against its own opening value.

smooth_sec pins the Gaussian kernel, in seconds; the default sizes it from the duration drawn (see :func:~radiens_qc._smooth.time_sigma_sec). A pinned width narrower than the report's window is widened to it, and 0 draws the trend unfiltered.