Timeshift epochs to new event

Hi,

I’m currently doing some research that involves looking at feedback. I’d like to be able to look at time frequency and the ERF around the feedback event, but baseline before the cue. In MATLAB I’d typically do this by epoching around the cue event, applying a baseline, then timeshifting to the feedback event. However it seems like MNE gets rid of any other events in the epochs after epoching to a specific event. I can’t timeshift by time or timepoints, as the response time for each epoch varies.

Do you have any suggestions as to how I could shift the epochs to an event trigger rather than shifting by time?

Best,
Chris

Hello @cpirrung,

you could use what we call “epochs metadata” in MNE-Python to retain information about the other (not time-locked) events when creating epochs. Please see the following tutorial for an introduction:

https://mne.tools/stable/auto_tutorials/epochs/40_autogenerate_metadata.html

Thanks @richard!

I’ve now created the metadata and it seems like the rest of the event information is being stored. However, I’m still not sure the best way to change the time-locked event from cue to feedback after the creation of the epochs. Is there something I’m missing in the documentation?