nirspipe.qc.figures.subject.denoise_compare#

What each pipeline step did: one small panel per metric, plus the per-channel detail.

Small multiples rather than one shared axis, because the metrics here run on unrelated scales. Each panel carries its own range and prints its values, so no comparison between panels is implied.

Direction is marked only on the whole chain, never on an intermediate step: a step can move a metric for reasons that are not quality. A panel with lower_better unset gets no direction at all, for rows where movement is not itself good or bad.

stage_metrics_figure renders whatever panels it is handed; denoise_stage_panels below turns the haemoglobin chain’s numbers into panels.

Module Contents#

Classes#

Panel

One mini panel: a title, one value per stage, and how to read it.

Functions#

denoise_stage_panels

Panels for the haemoglobin chain, from comparable_stage_metrics() output.

stage_metrics_figure

One mini panel per metric across labels, values printed on the points.

API#

class nirspipe.qc.figures.subject.denoise_compare.Panel#

Bases: typing.NamedTuple

One mini panel: a title, one value per stage, and how to read it.

title: str = None#
values: list = None#
lower_better: bool | None = None#
primary: bool = True#
unit: str = <Multiline-String>#
nirspipe.qc.figures.subject.denoise_compare.denoise_stage_panels(metrics: dict) → list[Panel]#

Panels for the haemoglobin chain, from comparable_stage_metrics() output.

Ordered quality first, then the share of variance still present, then the drift band power that only says whether the filter ran. That last is greyed: sitting entirely outside the analysis passband, it falls by the filter’s stopband attenuation whatever the data did.

nirspipe.qc.figures.subject.denoise_compare.stage_metrics_figure(labels: list[str], panels: list[Panel], n_cols: int = 3) → plotly.graph_objects.Figure | None#

One mini panel per metric across labels, values printed on the points.