TFTOPO Generate a figure showing a selected or representative image (e.g., an ERSP, ITC or ERP-image) from a supplied set of images, one for each scalp channel. Then, plot topoplot scalp maps of value distributions at specified (time, frequency) image points. Else, image the signed (selected) between-channel std(). Inputs may be outputs of timef(), crossf(), or erpimage.

Usage: >> tftopo(tfdata,times,freqs, 'key1', 'val1', 'key2', val2' ...)

Inputs:

tfdata = Set of time/freq images, one for each channel. Matrix dims: (time,freq,chans). Else, (time,freq,chans,subjects) for grand mean
RMS plotting.
times   
Vector of image (x-value) times in msec, from timef()).
freqs   
Vector of image (y-value) frequencies in Hz, from timef()).

Optional inputs:
'timefreqs'   
Array of time/frequency points at which to plot topoplot maps. Size: (nrows,2), each row given the [ms Hz] location of one point.
'showchan'   
[integer] Channel number of the tfdata to image. Else 0 to image the (median-signed) RMS values across channels. {default: 0}
'chanlocs'   
['string'|structure] Electrode locations file (for format, see >> topoplot example) or EEG.chanlocs structure {default: none}
'limits'   
Vector of plotting limits [minms maxms minhz maxhz mincaxis maxcaxis] May omit final vales, or use NaN's to use the input data limits. Ex: [nan nan -100 400];
'signifs'   
(times,freqs) Matrix of significance level(s) (e.g., from timef()) to zero out non-signif. tfdata points. Matrix size must be ([1|2], freqs, chans, subjects) if using the same threshold for all time points at each frequency, or ([1|2], freqs, times, chans, subjects). If first dimension is of size 1, data are assumed to contain positive values only {default: none}
'sigthresh'   
[K L] After masking time-frequency decomposition using the 'signifs' array (above), concatenate (time,freq) values for which no more than K electrodes have non-0 (significant) values. If several subjects, the second value L is used to concatenate subjects in the same way. {default: [1 1]}
'selchans'   
Channels to include in the topoplot scalp maps (and image values) {default: all}
'smooth'   
[pow2] magnification and smoothing factor. power of 2 (default: 1}.
'mode'   
['rms'|'ave'] ('rms') return root-mean-square, else ('ave') average power {default: 'rms' }
'logfreq'   
['on'|'off'|'native'] plot log frequencies {default: 'off'} 'native' means that the input is already in log frequencies
'vert'   
[times vector] (in msec) plot vertical dashed lines at specified times {default: 0}
'shiftimgs'   
[response_times_vector] - shift time/frequency images from several subjects by each subject's response time {default: no shift}
'title'   
[quoted_string] plot title (default: provided_string).
'cbar'   
['on'|'off'] plot color bar {default: 'on'}
'cmode'   
['common'|'separate'] 'common' or 'separate' color axis for each topoplot {default: 'common'}
'plotscalponly'   
[x,y] location (e.g. msec,hz). Plot one scalp map only; no time-frequency image.
'verbose'   
['on'|'off'] comment on operations on command line {default: 'on'}.
'axcopy'   
['on'|'off'] creates a copy of the figure axis and its graphic objects in a new pop-up window using the left mouse button {default: 'on'}..

Notes: 1) Additional topoplot optional arguments can be used.
2) In the topoplot maps, average power (not masked by significance) is used
instead of the (signed and masked) root-mean-square (RMS) values used in the image.
3) If tfdata from several subjects is used (via a 4-D tfdata input), RMS power is first
computed across electrodes, then across the subjects.

Authors: Scott Makeig, Arnaud Delorme & Marissa Westerfield, SCCN/INC/UCSD, La Jolla, 3/01

See also: timef(), topoplot, spectopo, timtopo, envtopo, changeunits

See the matlab file tftopo.m (may require other functions)

Back to functions