[Eeglablist] Fwd: [SCCN Contact Form] EEGLAB
joa.wagn at gmail.com
Thu Jun 1 15:40:29 PDT 2017
Hi Ron, hi Vera,
to align the timepoints for events such as heel strikes over trials you can
time warp the data by using a linear interpolation function. If you are
looking at the time domain such as for ERPs you can do this on the EEG
If you want to look at time-frequency transforms such as ERSPs you have to
first compute the power spectra over a sliding latency window to generate
single trial spectograms and then timewarp those single trial spectograms
(In this case it is important that you only timewarp AFTER frequency
transform - if you would timewarp the original EEG signal you would change
the frequencies of the signal).
You can do this with the function newtimef() in eeglab. The function has
the option to pass event latencies which to warp, see below an example for
time warping ERSPs.
You can also look at two of my papers where I applied this method:
Level of participation in robotic-assisted treadmill walking modulates
midline sensorimotor EEG rhythms in able-bodied subjects
J Wagner, T Solis-Escalante, P Grieshofer, C Neuper… - Neuroimage, 2012
Distinct β band oscillatory networks subserving motor and cognitive control
during gait adaptation
J Wagner, S Makeig, M Gola, C Neuper, G Müller-Putz - Journal of
Let me know if you have any questions!
%% load data
EEG = pop_loadset( ['Audiowalk_S01_cuewalk_PsynchCycleGAMMA.set'],[mypath]);
%%get event latencies for right and left steps
RHonS = [500 1500] %
LHonS = [100 1000]
[RH] = eeg_getepochevent(EEG , '101', RHonS, 'latency');
[LH] = eeg_getepochevent(EEG , '201', LHonS, 'latency');
%create matrix with event latencies
offset = zeros(size(1:EEG.trials));
EVENTLAT = [offset' LH' RH']
%% create vector with latencies that you want to warp the events to
NEWLAT = mean(EVENTLAT,1);
[ersp, itc, powbase, times, freqs, eboot, pboot, tfdata] =
newtimef(EEG.icaact(IC,:,:), EEG.pnts, [EEG.xmin EEG.xmax]*1000, EEG.srate,
0, 'cycles', [3 0.5], 'tlimits', [-1000 3000], 'freqs', [1 150],
'timesout', 500, 'timewarp', [EVENTLAT], 'timewarpms', [NEWLAT],
'baseline',[0 2000], 'plotitc', 'off', 'padratio', 8);
2017-06-01 14:57 GMT-07:00 Croce, Ronald <Ronald.Croce at unh.edu>:
> Joanna and Scott, I have a similar problem. I want to compare
> high-velocity visuomotor processing to that of slow-velocity processing.
> So, completion time will be different in each condition. Could one do a
> trial-by-trial analysis and then descriptively compare? Or, in some way
> statistically compare?
> Ron C.
> ------ Original message------
> *From: *Scott Makeig
> *Date: *Thu, Jun 1, 2017 4:26 PM
> *To: *Johanna Wagner;
> *Cc: *eeglablist at sccn.ucsd.edu;
> *Subject:*[Eeglablist] Fwd: [SCCN Contact Form] EEGLAB
> Johanna - Could you answer? -Scott
> ---------- Forwarded message ----------
> From: Vera Kooiman <g.m.kooiman at student.rug.nl>
> Date: Thu, Jun 1, 2017 at 2:33 AM
> Subject: [SCCN Contact Form] EEGLAB
> To: eeglab at sccn.ucsd.edu
> Dear Sir/Madam,
> My name is Vera Kooiman and momentarily I am working on my master thesis,
> measuring EEG in healthy participant walking with a lower-limb dummy
> I am using EEGLAB to analyse my data, but had a question, which I could
> not find an answer for online. I am trying to compare two different
> condition (normal walking vs walking with a prosthesis) using the ERSP in a
> STUDY. But during normal walking, the epoch (step cycle) duration is
> smaller (1 sec) than during walking with a prosthesis (1.5 sec). It is not
> possible to compare these condition because the epochs are not consistent.
> But is it possible to, for instance, scale the ERSP plots to similar
> lengths and still compute the statistical differences? We do not wish to
> scale the data, because this changes the frequencies in the data and
> therefore the result in the ERSP plots.
> I hope you can help me with this problem. Thank you in advance.
> Kind Regards,
> Vera Kooiman
> Scott Makeig, Research Scientist and Director, Swartz Center for
> Computational Neuroscience, Institute for Neural Computation, University of
> California San Diego, La Jolla CA 92093-0961, http://sccn.ucsd.edu/~scott
Johanna Wagner, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the eeglablist