nirspipe.qc.figures.hyper.groupnull_figures#

Panels for the cohort test nirspipe-hyper-groupnull writes: real dyads against their null.

Both read the tables the command already wrote and compute nothing that is not on them except a mean and its interval. byoccasion gives each occasion’s real value and the mean of its own draws; cohort gives each level’s lift and its two tests.

Module Contents#

Functions#

whole_level

The whole-brain rows, over every pairing where the null was drawn crossed.

p_column

The corrected p where the run asked for one, else the raw p.

build_occasion_panels

Per condition, each occasion’s real value over its null mean, then the two paired.

build_region_lift

Each region’s lift over its null, printed in its cell, bold with a star where test clears ALPHA.

Data#

API#

nirspipe.qc.figures.hyper.groupnull_figures.ALPHA = 0.05#
nirspipe.qc.figures.hyper.groupnull_figures.whole_level(frame: pandas.DataFrame) → pandas.DataFrame#

The whole-brain rows, over every pairing where the null was drawn crossed.

nirspipe.qc.figures.hyper.groupnull_figures.p_column(frame: pandas.DataFrame) → str#

The corrected p where the run asked for one, else the raw p.

nirspipe.qc.figures.hyper.groupnull_figures.build_occasion_panels(byoccasion: pandas.DataFrame, value: str, axis_title: str, captions: dict[str, str] | None = None) → plotly.graph_objects.Figure | None#

Per condition, each occasion’s real value over its null mean, then the two paired.

byoccasion whole-brain rows, 3 conditions x 12 occasions
  -> 3 rows: occasions along x on the left, null-to-real segments on the right

A real value at or below its null mean is a hollow point. captions adds a line per condition, which is where the cohort test’s result goes.

nirspipe.qc.figures.hyper.groupnull_figures.build_region_lift(cohort: pandas.DataFrame, value_label: str, test: str = 'paired') → plotly.graph_objects.Figure | None#

Each region’s lift over its null, printed in its cell, bold with a star where test clears ALPHA.

region pairs L>L, L>R, R>L, R>R in 2 conditions  ->  two 2 x 2 matrices
regions L, R homologous only in 2 conditions      ->  one regions x conditions grid

Lift is signed, so the scale is centred on zero and spans the largest lift either way. The corrected p is read where the run asked for one.