Converting stimulus-locked epochs to response-locked

Hi all,

I have created a preprocessing pipeline for MEG data. One of the steps in this pipeline is creating stimulus-locked epochs. These are in following steps cleaned of noise ( using automated noise detections with Autoreject), undergone an Independent Component Analysis (ICA) and some other basic preprocessing steps. Is there a function that can convert these stimulus-locked epochs to response-locked after they have been through my preprocessing pipeline?

I am using MNE version 1.0.3 and my operating system is macOs12.

Thank you for your help.

Best,
Antonia

hi Antonia,

there is “reepoch” mechanism in MNE but if you have autoreject or ICA object you can “apply” these steps
to a new set of epochs without refitting the autoreject or ICA model. That’s the easy way out for you I think.
We could hack the epochs to get the events of responses but it’s a bit difficult if you don’t understand the
internals of MNE Epochs, events etc.

would this help?

Alex

1 Like

Hello @antonia and welcome to the forum! I’d like to ask why you need to do this? So I can better understand your workflow / your analysis approach. Is it just because you eventually want to have both, stimulus- and response-locked epochs, and ensure they were preprocessed in the exact same way?

Richard

Hi Richard and Alex,

Thank you very much for helping me. My approach is to later compute the same analysis on both response-locked and stimulus-locked epochs. My preprocessing pipeline is computationally intense and consequently time-consuming. This is why I am trieng to aviod having to completely rerun it for response-locked epochs.

Applieng the autoreject and ICA solutions on my response-locked epochs sound very interesting. Is there a disadvantage to this approach compared to hacking the epochs to get the events of response?

Thank you again for your help!

Antonia

Hi,

Applieng the autoreject and ICA solutions on my response-locked epochs sound very interesting. Is there a disadvantage to this approach compared to hacking the epochs to get the events of response?

if you can avoid the hacking it’s much better I think. Less risk of mistakes.

Alex

1 Like

Hi Alex,

Okay, perfect. Thank you for your help.

Antonia