I have a situation where I would like individual trials to be able to belong to multiple events in the same evoked file. In other words I would like to be able to look at something like
Auditory1 = 1
Auditory2 = 2
AllAuditory =1,2
in the *same* evoked file. This is easy to do with regular mne. Can I also do this with mne-python? I was trying to use the combine_event_ids function for this, but it seems to remove the original two condition codes from the structure so that I'm only left with AllAuditory. I can see that I could create two separate evoked files splitting the data up in different ways, but that would be annoying for my pipeline. I tried to be clever and create doubles of the conditions in my original event_id:
and then use the b conditions for combine_event_ids, but I see that fails because even though the Auditory1 conditions nominally remain in the data structure, all their events get deleted (I'm assuming because the event code gets changed).
if I understand you correctly, your intent is to create averages including both conditions combined but also averages for each of the conditions. In that case just create your epochs with a dict, e.g. dict(aud_l=1, aud_r=2) as event_id parameter.
To have averages of 1, 2 and 1 + 2,
create a list including all three evoked objects and save them to a fiff.
e.g.
evokeds = [epochs[k].average() for k in event_id]
to create the separate evoked objects for each condition and then
evokeds += [epochs.average()]
to append the combined average to the previously created list.
then save the list of evokeds to a file using the mne.fiff.write_evoked function.