Dear Svenja, You could use your EMG triggers to generate a trial definition file. See page 108 of the SPM12 manual. Best, Vladimir On Fri, Sep 11, 2015 at 2:41 PM, Espenhahn, Svenja < [log in to unmask]> wrote: > Hi Vladimir, > > > > I have a question regarding epoching EEG data based on the onset of the > EMG. > > I would like to write a script that tells me the onset of the EMG in ms > from the marker in the EMG. Is it then possible to give a vector of onset > times to spm for the epoching? Would it be provided to the trialdefinition > as the trlshift? > > > > Thanks a lot for your help, > > Svenja >