API Reference#
This section contains the complete API documentation for eegprep. The API is organized into logical modules covering core functionality, preprocessing, independent component analysis, signal processing, input/output operations, and utility functions.
Core Classes#
|
Wrapper class for EEG datasets stored as dictionaries. |
Data Loading and Saving#
|
Load EEGLAB dataset from .set or .mat file. |
|
Wrap pop_loadset. |
|
Load EEG data from HDF5 file. |
|
Save EEG data to file. |
|
Load an EEG data file of a supported format from a BIDS dataset. |
Preprocessing Functions#
Artifact Removal#
|
All-in-one artifact removal, port of MATLAB clean_artifacts. |
|
Run the Artifact Subspace Reconstruction (ASR) method on EEG data. |
|
Remove (near-) flat-lined channels. |
|
Remove drifts from the data using a forward-backward high-pass filter. |
|
Remove periods with abnormally high-power content from continuous data. |
Channel Operations#
|
Remove channels with problematic data from a continuous data set. |
|
Remove channels with abnormal data from a continuous data set. |
|
Interpolate missing or bad EEG channels using spherical spline. |
|
Re-reference EEG data to average reference. |
Signal Processing#
|
Resample EEG data to a new sampling rate. |
|
Filter EEG data using EEGLAB's pop_eegfiltnew. |
|
Perform ICA decomposition using Picard algorithm. |
Independent Component Analysis#
|
Apply ICLabel to classify independent components. |
|
Extract features for ICLabel classification. |
Spectral Analysis#
|
Compute relative power spectral density for ICA components. |
|
Compute autocorrelation of ICA components. |
|
Compute autocorrelation of EEG ICA components using Welch method. |
|
Compute autocorrelation of EEG ICA components using FFT. |
Epoching and Selection#
|
Convert a continuous EEG dataset to epoched data by extracting data epochs time locked to specified event types or event indices. |
|
Python port of EEGLAB's pop_select for dict-based EEG. |
|
Reject EEG data segments specified by regions. |
|
Wrap eeg_eegrej. |
Visualization#
|
Plot a 2D topographic map of EEG data. |
Format Conversion#
|
Convert MNE Raw object to EEG data structure. |
|
Convert MNE epochs with ICA to EEGLAB dataset format. |
|
Convert EEG data structure to MNE Raw object. |
Utilities#
|
Validate and set up EEG dataset structure. |
|
Compare two EEG-like structures, reporting differences to stderr. |
|
Resolve channel identifiers to 0-based indices and labels. |
|
Convert latencies in time units (relative to per-epoch time 0) to latencies in data points assuming concatenated epochs (EEGLAB style). |
|
Convert event latencies in data points to latencies in time units (default seconds). |
|
Return a list of all EEG raw-data files in a BIDS dataset. |
|
Apply data cleaning to EEG files in a BIDS dataset. |
BIDS Pipeline#
|
Apply data cleaning to EEG files in a BIDS dataset. |
|
Return a list of all EEG raw-data files in a BIDS dataset. |
|
Load an EEG data file of a supported format from a BIDS dataset. |
Configuration#
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2). |