[Mne_analysis] apply baseline with variable interval over trials

Alexandre Gramfort alexandre.gramfort at m4x.org
Wed Mar 28 15:30:00 EDT 2018
Search archives:

hi Sophie,

I am afraid you will have to do this by hand with numpy by modifying
the epochs._data attribute.

let us know if you need help. You will need to use the selection attribute
of Epochs to make sure you subtract the correct epoch.


> I have a problem resulting from varying trial durations.
> I would like to baseline correct my epochs with an event that is different
> from the one I used for time-locking the epochs. The epochs are time-locked
> to a target event which is preceded by a cue event with a variable SOA. The
> baseline should be taken from before the cue.
> I could think of two ways to do this, but neither of them seemed to work:
> a) epoch to cue, apply baseline, re-epoch to target event
>  (mne.epoch wants raw data)
> b) epoch to target, apply baseline with different interval for each trial
> (epochs.apply_baseline takes only two time points)
> Do you have any hints on how to achieve this other than subtracting the mean
> of the desired baseline-interval by hand? Could the apply_baseline function
> be extended to take another event to use for the baseline?
> Thank you,
> Sophie
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.

More information about the Mne_analysis mailing list