ffrprep.reports.build_phase_consistency_section

ffrprep.reports.build_phase_consistency_section(epochs_a, epochs_b, *, section_id, title, alpha=0.01, pol_names=None, mask=True)[source]

Build a phase-consistency section from two polarities of Epochs.

Pairs ffrprep.analysis.compute_phase_consistency() with either ffrprep.analysis.plot_phase_consistency_masked() (when mask=True) or ffrprep.analysis.plot_phase_consistency() (when mask=False); the resulting plot is embedded as a single inline PNG data URI alongside a summary table.

Parameters:
  • epochs_a (mne.Epochs) – Two polarities of Epochs (typically positive / negative for an FFR experiment), matched in sampling rate, time axis, and channel count.

  • epochs_b (mne.Epochs) – Two polarities of Epochs (typically positive / negative for an FFR experiment), matched in sampling rate, time axis, and channel count.

  • section_id (str) – Anchor used by the report template.

  • title (str) – Heading shown in the report.

  • alpha (float, default 0.01) – Significance level forwarded to plot_phase_consistency_masked; controls the per-cell masking cutoff. Ignored when mask=False.

  • pol_names (tuple[str, str] | None) – Display names for the two polarities (e.g. ("Positive", "Negative")). When given, replaces the PR-35 plot’s opaque A / B subplot titles with the actual trial-type names and adds a Polarities row to the summary so report readers know which subplot is which. The add / sub subplots are auto-labelled "<a> + <b>" / "<a> <b>".

  • mask (bool, default True) – When True, apply significance masking via plot_phase_consistency_masked and surface the threshold in the summary table. When False, render the unmasked plot via plot_phase_consistency and drop the alpha-related summary row.