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
finputchecknames innewtimef.mlines 513-587, includingchaninfo,ntimesout,plotamp,maxfreq,cycleinc, andnewfig.finputcheckmodeignore(line 587) returns every other name astimefreqopts, and line 1188 passes that list totimefreq. Namestimefreqaccepts (ffttaper,wavelet,timestretch;timefreq.mlines 171-189) are forwarded. Lines 1186-1188 pass'wavelet', g.cyclesbefore those leftovers, and the last value wins, so a forwardedwaveletreplacescyclesinsidetimefreq. EEGLAB leavesnewtimef’s owng.cyclesunchanged, so the FFT scale at lines 1207-1209 (2/0.375/winsizewheng.cycles(1)==0, squared for power; the defaultwinsizeis line 453) follows the originalcyclesrather than the decomposition that ran. Awaveletof 0 therefore runs an unscaled FFT, andcycles0 with a wavelet applies that FFT scale to the wavelet. EEGPrep scales the decomposition that ran. Any other name, includingoverlap, is an undefinedtimefreqargument, reported with the caller’s spelling.rngis an EEGPrep-only name that seeds the bootstrap. Defaults follow that list:baseline0,scale"log",basenormandtrialbase"off",naccu200,boottype"shuffle",timesout200,padratio2,verbose"on", and an emptytitle.freqsdefaults to[0, 50](line 542).maxfreqabove the Nyquist rate is then reduced to that rate, and anymaxfreqother than 50 replacesfreqs(2)(lines 704-709). A scalarfreqskeeps its first value. A sampling rate below 100 Hz yields[0, Nyquist]. That cap is not part of the default assignment.ntimesoutis the output time count whentimesoutis not a vector (lines 1176-1182).itctypereplacestypeunlessitctypeisphasecoher(line 591); the decomposition uses thattype.alpha,powbase,pboot, andrbootdefault to empty, the Python stand-in for the NaN defaults at lines 438, 526, 527, and 528.elocsstays unset instead of thechan.locspath at line 437. An omittedcyclespair keeps the fifth argument (DEFAULT_VARWIN0 at line 428).plotampoffforcesploterspoff (line 589). A figure is drawn whenplotersporplotitcis on (line 1426); passplotto override that.