Filtering and Signal Processing#

FIR filter design, filtering helpers, and window functions.

dftfilt3 accepts cycleinc, winsize, and timesupport as keywords or positional name/value pairs. Defaults are linear cycle spacing, a variable-length Morlet wavelet, and a time support of seven standard deviations. type is not an option.

eegprep.blockave(data, frames[, epochs, weights])

Return an epoch average from channel-major concatenated data.

eegprep.dftfilt(length, maxfreq, cycle, ...)

Return legacy discrete Fourier filters.

eegprep.dftfilt2(freqs, cycles, srate[, ...])

Return EEGLAB dftfilt2 wavelet filters.

eegprep.dftfilt3(freqs, cycles, srate, ...)

Return EEGLAB dftfilt3-style complex wavelet filters.

eegprep.eegfilt(data, srate, locutoff, hicutoff)

Filter an array using the legacy EEGLAB eegfilt design.

eegprep.env(data[, timelimits, timearray])

Return the sample-wise maximum and minimum across channels.

eegprep.fir_filterdcpadded(b, a, data[, ...])

Pad data with endpoint constants and filter along the first axis.

eegprep.firfiltreport(*args, **kwargs)

Return an EEGLAB-style FIR filter report.

eegprep.firfiltsplit(EEG, b[, causal, ...])

Filter continuous chunks split at boundaries or each epoch independently.

eegprep.firgauss(fc[, fs])

Return a Gaussian low-pass FIR coefficient vector.

eegprep.firws(m, f[, t, w])

Designs windowed sinc type I linear phase FIR filter.

eegprep.firwsord(wintype, fs, df[, dev])

Estimate windowed sinc FIR filter order depending on window type and requested transition band width.

eegprep.getipsph(x[, m])

Return an EEGLAB-compatible sphering or quasi-sphering matrix.

eegprep.invfirwsord(wintype, fs, m[, dev])

Estimate transition bandwidth and ripple for a windowed-sinc FIR order.

eegprep.invkaiserbeta(beta)

Estimate maximum passband deviation from a Kaiser window beta.

eegprep.kaiserbeta(dev)

Estimate the Kaiser window beta from maximum passband deviation.

eegprep.minphaserceps(b, *[, ...])

Convert FIR coefficients to a minimum-phase impulse response.

eegprep.movav(data[, xvals, xwidth, xadv, ...])

Return moving-window averages and their x-coordinate midpoints.

eegprep.plotfresp(b[, a, nfft, fs, dir, show])

Plot impulse, step, magnitude, and phase response like FIRFilt.

eegprep.rmart(datafile, outfile, nchans, ...)

Remove threshold-triggered EOG artifacts from a float32 data file.

eegprep.rmsave(data[, frames])

Return the RMS of each channel in consecutive equal-length blocks.

eegprep.windows(t, m[, a])

Return a symmetric window vector.