Time-Frequency#

Time-frequency decomposition, coherence, phase-amplitude coupling, and time warping.

newtimef accepts the finputcheck names from newtimef.m as keywords or positional name/value pairs, including chaninfo, ntimesout, plotamp, maxfreq, cycleinc, and newfig. Other names that timefreq accepts (ffttaper, wavelet, timestretch) are forwarded to it. A forwarded wavelet replaces cycles inside timefreq (newtimef.m lines 1186-1188). EEGLAB still applies the lines 1207-1209 FFT scale, 2/0.375/winsize (default winsize at line 453), from the original cycles; EEGPrep applies it only to 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 the newtimef list, including baseline 0, scale "log", timesout 200, and padratio 2. ntimesout is the output time count when timesout is not a vector. itctype replaces type unless it is phasecoher. The default frequency range is [0, 50]; maxfreq above the Nyquist rate is capped and then written into that range, so a sampling rate below 100 Hz yields [0, Nyquist]. A figure is drawn when plotersp or plotitc is on. plotamp off turns plotersp off.

make_timewarp accepts baselineLatency, eventConditions, maxSTDForAbsolute, and maxSTDForRelative as keywords or positional name/value pairs. The Python names baseline_latency, event_conditions, max_std_for_absolute, and max_std_for_relative do the same thing. Returned epoch indices are zero-based. Defaults are a baseline of 0 and no standard-deviation rejection.

eegprep.angtimewarp(ev_latency, new_latency, ...)

Warp an angular time series and wrap results to (-pi, pi].

eegprep.bootstat(args, statistic, *[, ...])

Accumulate surrogate statistics and return EEGLAB-style thresholds.

eegprep.crossf(x, y, frames, tlimits, srate)

Compute legacy crossf outputs using EEGPrep's newcrossf core.

eegprep.newcrossf(x, y, frames, tlimits, srate)

Compute an EEGLAB-like event-related coherence decomposition.

eegprep.newtimef(data, frames, tlimits, srate)

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

eegprep.newtimefbaseln(power, timesout, *[, ...])

Apply EEGLAB average baseline correction to absolute power.

eegprep.newtimefitc(tfdecomp[, itctype])

Compute EEGLAB-style inter-trial coherence.

eegprep.newtimefpowerunit([params])

Return the display unit implied by newtimef baseline settings.

eegprep.newtimeftrialbaseln(power, timesout, *)

Apply trial-level divisive or standardized baseline correction.

eegprep.make_timewarp(eeg, event_sequence, *args)

Select epochs containing an ordered event sequence.

eegprep.pac(X, Y, srate, **kwargs)

Compute phase-amplitude coupling from epoched signals.

eegprep.pac_cont(X, Y, srate, **kwargs)

Compute sliding-window phase-amplitude coupling from continuous data.

eegprep.tf_cycle_calc([freqs, width, ...])

Calculate Morlet wavelet cycles from temporal or spectral width.

eegprep.timef(data, frames, tlimits, srate)

Compute legacy timef outputs using EEGPrep's newtimef core.

eegprep.timefreq(data, srate, *[, frames, ...])

Return EEGLAB-like spectral estimates for each trial.

eegprep.timewarp(ev_latency, new_latency)

Return the linear interpolation matrix that warps event latencies.