ffrprep.preproc.build_analysis_payload¶
- ffrprep.preproc.build_analysis_payload(epochs, by_event_type=True, difference_pairs=None)[source]¶
Compute the structured
{by_type, combined, diff}analysis shape.Always emits a
combinedEvoked. Whenby_event_typeis True, also emits per-trial-type Evokeds and (when applicable) one or more difference Evokeds. Difference computation follows the rules ofmake_difference_evokeds(): auto-paired only when there are exactly two trial types anddifference_pairs is None; for >2 types the caller must opt in viadifference_pairs.- Parameters:
epochs (mne.Epochs) – Source epochs (typically loaded from a single per-condition preprocessing output, or stacked across conditions).
by_event_type (bool, default True) – Emit per-trial-type and difference outputs in addition to the combined Evoked.
difference_pairs (list[tuple[str, str]] | None) – Forwarded to
make_difference_evokeds().
- Returns:
payload – A subset of
{"by_type", "combined", "diff"}populated based onby_event_typeand the pair-discovery rules above.- Return type: