newtimef#

newtimef(data, frames, tlimits, srate, cycles=0, *args, **kwargs)#

Compute an EEGLAB-like ERSP/ITC time-frequency decomposition.

Positional name/value pairs and keywords use the finputcheck names in newtimef.m lines 513-587, including chaninfo, ntimesout, plotamp, maxfreq, cycleinc, and newfig. finputcheck mode ignore (line 587) returns every other name as timefreqopts, and line 1188 passes that list to timefreq. Names timefreq accepts (ffttaper, wavelet, timestretch; timefreq.m lines 171-189) are forwarded. Lines 1186-1188 pass 'wavelet', g.cycles before those leftovers, and the last value wins, so a forwarded wavelet replaces cycles inside timefreq. EEGLAB leaves newtimef’s own g.cycles unchanged, so the FFT scale at lines 1207-1209 (2/0.375/winsize when g.cycles(1)==0, squared for power; the default winsize is line 453) follows the original cycles rather than the decomposition that ran. A wavelet of 0 therefore runs an unscaled FFT, and cycles 0 with a wavelet applies that FFT scale to the wavelet. EEGPrep scales the decomposition that ran. Any other name, including overlap, is an undefined timefreq argument, reported with the caller’s spelling. rng is an EEGPrep-only name that seeds the bootstrap. Defaults follow that list: baseline 0, scale "log", basenorm and trialbase "off", naccu 200, boottype "shuffle", timesout 200, padratio 2, verbose "on", and an empty title. freqs defaults to [0, 50] (line 542). maxfreq above the Nyquist rate is then reduced to that rate, and any maxfreq other than 50 replaces freqs(2) (lines 704-709). A scalar freqs keeps its first value. A sampling rate below 100 Hz yields [0, Nyquist]. That cap is not part of the default assignment. ntimesout is the output time count when timesout is not a vector (lines 1176-1182). itctype replaces type unless itctype is phasecoher (line 591); the decomposition uses that type. alpha, powbase, pboot, and rboot default to empty, the Python stand-in for the NaN defaults at lines 438, 526, 527, and 528. elocs stays unset instead of the chan.locs path at line 437. An omitted cycles pair keeps the fifth argument (DEFAULT_VARWIN 0 at line 428). plotamp off forces plotersp off (line 589). A figure is drawn when plotersp or plotitc is on (line 1426); pass plot to override that.

Parameters:
Return type:

TimeFrequencyResult