ffrprep.preproc.make_difference_evokeds¶
- ffrprep.preproc.make_difference_evokeds(evoked_dict, pairs=None)[source]¶
Compute
A - BEvokeds for one or more trial-type pairs.- Parameters:
evoked_dict (dict[str, mne.Evoked]) – Per-trial-type Evoked outputs, typically the dict returned by
make_evoked(epochs, by_event_type=True).pairs (list[tuple[str, str]] | None) – Pairs to subtract. When None, the single
(A, B)pair is auto-built from insertion order if and only if the dict has exactly two entries; otherwise an empty dict is returned and the caller is expected to opt in explicitly viapairs.
- Returns:
diffs – Tuple-keyed dict. Each Evoked has
.comment = "diff_{A}Vs{B}"so reports can label by pair.- Return type:
- Raises:
KeyError – If any requested pair references a trial type missing from
evoked_dict.