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 combined Evoked. When by_event_type is True, also emits per-trial-type Evokeds and (when applicable) one or more difference Evokeds. Difference computation follows the rules of make_difference_evokeds(): auto-paired only when there are exactly two trial types and difference_pairs is None; for >2 types the caller must opt in via difference_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 on by_event_type and the pair-discovery rules above.

Return type:

dict