Preprocessing and Artifacts#

Artifact detection and repair, referencing, resampling, interpolation, and rejection.

eegprep.clean_artifacts(EEG[, ...])

All-in-one artifact removal, port of MATLAB clean_artifacts.

eegprep.clean_asr(EEG[, cutoff, window_len, ...])

Run the Artifact Subspace Reconstruction (ASR) method on EEG data.

eegprep.clean_channels(EEG[, ...])

Remove channels with problematic data from a continuous data set.

eegprep.clean_channels_nolocs(EEG[, ...])

Remove channels with abnormal data from a continuous data set.

eegprep.clean_drifts(EEG[, transition, ...])

Remove drifts from the data using a forward-backward high-pass filter.

eegprep.clean_flatlines(EEG[, ...])

Remove (near-) flat-lined channels.

eegprep.clean_rawdata_vis_artifacts(clean_eeg)

Compare a cleaned dataset against its original clean_rawdata source.

eegprep.clean_rawdata_vis_artifacts_diagnostics(...)

Return clean_rawdata sample/channel rejection diagnostics.

eegprep.clean_windows(EEG[, ...])

Remove periods with abnormally high-power content from continuous data.

eegprep.correct_mc(EEG[, cycles, freqrange, ...])

Estimate an EEGLAB-style multiple-comparison correction count.

eegprep.correctfit(pvalue, *[, allpval, ...])

Return a gamma-fit corrected p-value and fitted parameters.

eegprep.eeg_eegrej(EEG, regions)

Reject EEG data segments specified by regions.

eegprep.eeg_interp(EEG, bad_chans[, method, ...])

Interpolate missing or bad EEG channels using spherical spline.

eegprep.eeg_rejsuperpose(EEG, typerej, ...)

Combine stored rejection marks into EEG.reject.rejglobal.

eegprep.eeglab_clean_artifacts(EEG[, ...])

Clean artifacts from EEG data using EEGLAB's clean_artifacts.

eegprep.eegrej(indata, regions, timelength)

Remove [beg end] sample ranges (1-based, inclusive) from continuous data and update events.

eegprep.eegthresh(signal, pnts, electrodes, ...)

Reject epochs with out-of-bounds values in a time window.

eegprep.entropy_rej(signal[, threshold, ...])

Return entropy scores and rejection flags along the trial dimension.

eegprep.interp(*args, **kwargs)

Wrap eeg_interp.

eegprep.jointprob(signal[, threshold, ...])

Port of EEGLAB jointprob for deterministic rejection scoring.

eegprep.kurt(data)

Return column-wise excess kurtosis using EEGLAB's legacy formula.

eegprep.realproba(data[, bins])

Compute per-sample empirical probabilities and the distribution.

eegprep.rejkurt(signal[, threshold, ...])

Port of EEGLAB rejkurt for deterministic rejection scoring.

eegprep.rejtrend(signal, pointrange, ...[, step])

Detect trials containing linear trends with high slope and R-squared.

eegprep.reref(*args, **kwargs)

Wrap pop_reref.

eegprep.resample(*args, **kwargs)

Wrap pop_resample.

eegprep.rmbase(data[, frames, basevector, ...])

Subtract per-channel baseline means from continuous or epoched data.

eegprep.rsadjust(lambda3, lambda4, mean, ...)

Return lambda1 through lambda4 adjusted to mean and variance.

eegprep.rsfit(x, value[, plot, return_details])

Return a Ramberg-Schmeiser fitted p-value for value within x.

eegprep.rsget(lambdas, value)

Return the fitted Ramberg-Schmeiser cumulative probability at value.

eegprep.rspdfsolv(lambdas, skewness, kurtosis)

Return the Ramberg-Schmeiser moment residual for lambda3/lambda4.

eegprep.rspfunc(pvalue, lambdas, value)

Return the absolute quantile residual for one probability value.

eegprep.signalstat(data[, plotlab, dlabel, ...])

Compute EEGLAB-style summary statistics for a real-valued signal.