Event-related Time/Frequency Analysis
Our basic event-related time/frequency analysis function is timef(). Given a collection of single-trial event-related data epochs, it computes their mean event-related spectral perturbation (ERSP) features. The ERSP measures mean log changes in the baseline EEG power spectrum, computed using FFTs or wavelets, at each frequency and time relative to the time locking event.
By default, the lower panel of the timef() figure also displays the inter-trial coherence (ITC), a measure, at each frequency and time point relative the time locking event, of the degree of phase consistency (or phase-locking) across the single trials.
Example:
Compute and plot the event-related time/frequency dynamics a central posterior alpha component from one subject following the brief presentation of small non-target stimuli in a visual selective attention task.
data = floatread('nontargets.fdt',[31,inf]); % read float data load wts.mat % load stored ICA wts and sph winv = inv(wts*sph); % inverse weight matrix of maps act = wts*sph*data; % component activations alpha = 0.01; % plot data with bootstrap prob. < 0.01 cycles = 0; % use FFTs (cycles>0 -> wavelets) winsize = 128; % use 1/2-sec windows padratio = 2; % pad to 1-sec, giving 1-Hz resolution timesout = 200; % compute at 200 time values maxHz = 25; % high frequency to plot and return figure; % plot ERSP and ITC for central posterior alpha component timef(act(1,:),frames,[-1000 2000],'ee114: comp1',... srate,cycles,winsize,timesout,padratio,... maxHz,winv(:,1),'chan.locs',alpha);Note in the (upper image panel) below, the multiple small but significant event-related perturbations in spectral power of a central posterior alpha component activation, including brief -1 dB power decrease at (12 Hz, 200 ms), followed by a <1 dB power increase centered at (11 Hz, 450 ms). More information on plot details is available here.
![]()
Note in the (lower image panel) above, the extended period of "alpha-ringing" in the central posterior independent component ERP (beginning during the brief 10-Hz ERSP power decrease), and the corresponding period of significant 10-Hz ITC. Note also the concurrent 3-5 Hz ITC before 500 ms and the corresponding slow undulation in the "alpha ringing" before in the same time period.
Function crossf() is similar to timef(). It displays event-related coherence (ERCOH) between two sets of single-trial data in the form of time/frequency images of coherence magnitude and coherence phase lag at each frequency and time relative to the time locking event.
Test the accuracy of ICA on simulated data ...
Open the function help window
View log of changes to this tutori al.
Comments and suggestions on this tutorial
are welcome. Email scott@salk.edu