erpimage#
- erpimage(data, sortvar=None, times=None, title='', avewidth=1, decimate=0, *options, target=None, title_fontsize=None, rng=None, **kwargs)#
Image single trials sorted and smoothed across trials, as EEGLAB
erpimage.The positional arguments follow EEGLAB:
datais (frames, trials) for one channel (or a (1, frames*trials) concatenation),sortvarholds one value per trial (trials with NaN are dropped),timesis latencies in ms or[start_ms, frames, srate],avewidthis the moving-average width in trials anddecimatethe window advance. EEGLAB options follow either as'key', valuetokens (erpimage(data, rt, times, '', 5, 1, 'erp', 'cbar')) or as keywords (erp=True, cbar=True). Supported options:align,timewarp,renorm,noplot,NoShow,nosort,replace_ties,valsort,phasesort,ampsort,sortwin,showwin,plotamps,limits,sortvar_limits,signif,caxis,erp(1 to 4 percentile ERPs),erpalpha,erpstd,erp_grid,erp_vltg_ticks,rmerp,coher,srate,cycles,cbar,cbar_title,topo,spec,specaxis,horz,vert,auxvar,sortvarpercent,noxlabel,yerplabel,avg_type,img_trialax_label,img_trialax_ticks,baseline,baselinedb,filtandplotmode.Numbers match EEGLAB. Where EEGLAB’s behavior contradicts its own help, EEGPrep follows the help:
sortidxindexes the input trials,noplothides only the sortvar trace, anderpalphadraws unbiased random signs for its permutation test (EEGLAB’ssign(randn-0.5)is +1 only 31% of the time, sccn/eeglab#976), soerpalphathresholds differ slightly from MATLAB. Non-integer boxcar widths raiseValueError, as MATLAB R2025b does. Invalid inputs raiseValueError; the notes EEGLAB prints and continues past (clamped widths, removed NaN trials, ignored options) are logged throughlogging.- Parameters:
target (Any) – Matplotlib Figure or SubFigure to draw into instead of a new figure window; not allowed with
NoShow.title_fontsize (float | None) – font size of the image title.
rng (Any) – seed,
numpy.random.GeneratororRandomStatefor the coherence bootstrap and theerpalphapermutations.data (Any)
sortvar (Any)
times (Any)
title (str)
avewidth (Any)
decimate (Any)
options (Any)
kwargs (Any)
- Returns:
ErpimageResultwith the 15 EEGLAB outputs and the figure (NonewithNoShow).- Raises:
TypeError –
targetis not a Matplotlib Figure or SubFigure.ValueError – invalid data, sorting variable or option values.
- Return type:
ErpimageResult