| ENVTOPO | Plot the envelope of a multichannel data epoch, plus envelopes and scalp maps of specified or largest-contributing components. If a 3-D input matrix, operates on the mean of the data epochs. Click on individual axes to examine them in detail. The black lines represent the max and min values across all channels at each time point. The blue shading represents the max and min contributions of the selected components tothose channels. The paired colored lines represent the max and min contributions of the indicated component across all channels. |
![]() | |
| Usage: | >> envtopo(data,weights,'chanlocs',file_or_struct); >> [cmpvarorder,cmpvars,cmpframes,cmptimes,cmpsplotted,sortvar] = envtopo(data, weights, 'key1', val1, ...); |
| Inputs: | |
data |
single data epoch (chans,frames), else it a 3-D epoched data matrix (chans,frames,epochs) -> processes the mean data epoch. |
weights |
linear decomposition (unmixing) weight matrix. The whole matrix should be passed to the function here. Ex: (EEG.icaweights*EEG.icasphere) |
| Required keyword: | |
'chanlocs' |
[string] channel location filename or EEG.chanlocs structure. For more information, see >> topoplot example |
| Optional inputs: | |
'compnums' |
[integer array] vector of component indices to use in the calculations and to select plotted components from {default|[]: all} |
'compsplot' |
[integer] the number of largest contributing components to plot. compnums in the latter case is restricted in size by the internal variable MAXTOPOS (20) {default|[] -> 7} |
'subcomps' |
[integer vector] indices of comps. to remove from the whole data before plotting. 0 -> none {default: if 'compnums' listed, remove all others} |
'limits' |
0 or [minms maxms] or [minms maxms minuV maxuV]. Specify start/end plot (x) limits (in ms) and min/max y-axis limits (in uV). If 0, or if both minmx & maxms == 0 -> use latencies from 'timerange' (else 0:frames-1). If both minuV and |
maxuV |
0 -> use data uV limits {default: 0} |
'timerange' |
start and end input data latencies (in ms) {default: from 'limits' if any}. Note: Does NOT select a portion of the input data, just makes time labels. |
'limcontrib' |
[minms maxms] time range (in ms) in which to rank component contribution (boundaries shown with thin dotted lines) {default|[]|[0 0] -> plotting limits} |
'sortvar' |
['mp'|'pv'|'pp'|'rp'] {default:'mp'} 'mp', sort components by maximum mean back-projected power in the 'limcontrib' time range: mp(comp) = max(Mean(back_proj.^2)); where back_proj = comp_map * comp_activation(t) for t in 'limcontrib' 'pv', sort components by percent variance accounted for (eeg_pvaf) |
pvaf(comp) |
100-100*mean(var(data - back_proj))/mean(var(data)); 'pp', sort components by percent power accounted for (ppaf) |
ppaf(comp) |
100-100*Mean((data - back_proj).^2)/Mean(data.^2); 'rp', sort components by relative power |
rp(comp) |
100*Mean(back_proj.^2)/Mean(data.^2); |
'title' |
[string] plot title {default|[] -> none} |
'plotchans' |
[integer array] data channels to use in computing contributions and envelopes, and also for making scalp topo plots {default|[] -> all}, by calling topoplot(). |
'voffsets' |
[float array] vertical line extentions above the data max to disentangle plot lines (left->right heads, values in y-axis units) {default|[] -> none} |
'colors' |
[string] filename of file containing colors for envelopes, 3 chars per line, (. = blank). First color should be "w.." (white) Else, 'bold' -> plot default colors in thick lines. {default|[] -> standard Matlab color order} |
'fillcomp' |
int_vector>0 -> fill the numbered component envelope(s) with solid color. Ex: [1] or [1 5] {default|[]|0 -> no fill} |
'vert' |
vector of times (in ms) at which to plot vertical dashed lines {default|[] -> none} |
'icawinv' |
[float array] inverse weight matrix. Normally computed by inverting the weights*sphere matrix (Note: If some components have been removed, the pseudo-inverse does not represent component maps accurately). |
'icaact' |
[float array] component activations. {default: computed from the input weight matrix} |
'envmode' |
['avg'|'rms'] compute the average envelope or the root mean square envelope {default: 'avg'} |
'sumenv' |
['on'|'off'|'fill'] 'fill' -> show the filled envelope of the summed projections of the selected components; 'on' -> show the envelope only {default: 'fill'} |
'actscale' |
['on'|'off'] scale component scalp maps by maximum component activity in the designated (limcontrib) interval. 'off' -> scale scalp maps individually using +/- max(abs(map value)) {default: 'off'} |
'dispmaps' |
['on'|'off'] display component numbers and scalp maps {default: 'on'} |
'topoplotkey','val' |
optional additional topoplot() arguments {default: none} |
| Outputs: | |
cmpvarorder |
component numbers in decreasing order of max variance in data |
cmpvars |
('sortvar') max power for all components tested, sorted from highest to lowest. See 'sortvar' 'mp' |
cmpframes |
frames of comvars for each component plotted |
cmptimes |
times of compvars for each component plotted |
cmpsplotted |
indices of components plotted. |
unsorted_compvars |
compvars(compsplotted); |
sortvar |
The computed data used to sort components with. See 'sortvar' option above. |
| Notes: | To label maps with other than component numbers, put four-char strings into a local (pwd) file named 'envtopo.labels' (using . = space) in time-order of their projection maxima |
| Authors: | Scott Makeig & Arnaud Delorme, SCCN/INC/UCSD, La Jolla, 3/1998 |
| See also: | timtopo() axcopy |