Pipeline inputs#

Input file paths#

Argument

Description

Example

vhdr_files (required)

List of raw EEG file paths

['raw/Vp01.vhdr', 'raw/Vp02.vhdr', ...]

Nested list if (some) participants have multiple EEG files or

[['raw/Vp01_a.vhdr', 'raw/Vp01_b.vhdr'], 'raw/Vp02.vhdr', ...]

Directory path with raw EEG files

'raw'

log_files (required)

List of behavioral log file paths

['log/Vp01.txt', 'log/Vp02.txt', ...]

Directory of raw EEG files

'log'

Output file paths#

Argument

Description

Example

output_dir (required)

Output directory

'data/output'

clean_dir (default: None)

Cleaned (continuous) data output directory

'data/clean'

epochs_dir (default: None)

Epoched data output directory

'data/clean'

report_dir (default: None)

HTML quality control report output directory

'data/reports'

to_df (default: True)

Save outputs as data frames with comma-separated values or

True

Save outputs as MNE-Python (.fif) files or

False

Save outputs as data frames and MNE-Python files

'both'

Preprocessing options#

Argument

Description

Example

downsample_sfreq (default: None)

Downsample to lower sampling rate or

250.0

Do not downsample

None

veog_channels (default: 'auto')

Construct bipolar VEOG from two EEG or EOG channels or

['Fp1', 'IO1']

Construct VEOG from default channels or

'auto'

Do not construct a new VEOG channel

None

heog_channels (default: 'auto')

Construct bipolar HEOG from two EEG or EOG channels or

['F9', 'F10']

Construct HEOG from default channels or

'auto'

Do not construct a new HEOG channel

None

montage (default: 'easycap-M1')

Standard EEG montage name or

'easycap-M1'

Custom EEG montage file path

'data/chanlocs.elc'

ref_channels (default: 'average')

List of channels to re-reference EEG channels to or

['M1', 'M2']

Re-reference EEG channels to an average reference or

'average'

Use the Reference Electrode Standardization Technique (REST)

'REST'

bad_channels (default: None)

Lists of bad channels for each participant or

[['P7', 'Oz'], ['Fp2'], ...]

Dict with participant labels and their list of bad channels or

{'Vp05': ['PO8', 'O2'], ...}

Auto-detect bad channels based on standard error across epochs or

'auto'

Don’t interpolate any bad channels

None

besa_files (default: None)

Directory of BESA/MSEC correction matrix files or

'data/cali'

List of BESA/MSEC correction matrix file paths or

['data/cali/Vp01.matrix', 'data/cali/Vp02.matrix', ...]

Don’t use BESA/MSEC ocular correction

None

ica_method (default: None)

ICA method or

'fastica' or 'infomax' or 'picard'

Don’t apply ICA

None

ica_n_components (default: None)

Number of ICA components to use or

15

Proportion of variance explained by ICA components or

0.99

Use (almost) all possible ICA components

None

highpass_freq (default: 0.1)

High-pass filter cutoff frequency or

0.1

Do not apply high-pass filter

None

lowpass_freq (default: 40.0)

Low-pass filter cutoff frequency or

40.0

Do not apply low-pass filter

None

Epoching options#

Argument

Description

Example

triggers (recommended, default: None)

Numerical EEG triggers for events of interest

[201, 202]

triggers_column (default: None)

Name of log file column with EEG triggers for automatic matching

'trigger'

epochs_tmin (default: -0.5)

Start of epochs relative to event onset (in s)

-0.5

epochs_tmax (default: 1.5)

End of epochs relative to event onset (in s)

1.5

baseline (default: (-0.2, 0.0))

Time window for baseline correction (in s) or

(-0.2, 0.0)

Use entire prestimulus interval or

(None, 0.0)

Do not perform baseline correction

None

reject_peak_to_peak (default: 200.0)

Peak-to-peak threshold for rejecting epochs (in µV) or

200.0

Do not reject epochs based on peak-to-peak amplitude

None

components (recommended, default: None)

Definition of single trial ERP components of interest

{'name': ['P1', 'N170'], 'tmin': [0.08, 0.15], 'tmax': [0.13, 0.2], 'roi': [['PO3', ...], ['P7', ...]]}

Averaging options#

Argument

Description

Example

average_by (recommended, default: None)

Selection of (combinations of) conditions to create by-participant averages for (keys = custom condition labels, values = Pandas query)

{'neg_unrel': 'context == "negative" & semantics == "unrelated" & rt < 3000', ...}

Time-frequency analsis options#

Argument

Description

Example

perform_tfr (default: False)

Enable time-frequency analysis or

True or False

tfr_subtract_evoked (default: False)

Subtract evoked activity from epochs before time-frequency analysis or

True or False

tfr_freqs (default: np.linspace(4.0, 40.0, num=37))

Frequencies for the family of Morlet wavelets

np.arange(6.0, 41.0, step=2.0)

tfr_cycles (default: np.linspace(2.0, 20.0, num=37))

Numbers of cycles for the family of Morlet wavelets

np.arange(2.0, 21.0, step=1.0)

tfr_mode (default: 'percent')

Method for divisive baseline correction of event-related power using the full epoch interval (Delorme & Grandchamp, 2012)

'percent' or 'ratio' or 'logratio' or 'zscore' or 'zlogratio' or None

tfr_baseline (default: (-0.45, -0.05))

Time window for subtractive baseline correction of event-related power

(-0.45, -0.05)

tfr_components (default: None)

Similar to components, the definition of single trial event-related power bands of interest

{'name': ['alpha'], 'tmin': [0.05], 'tmax': [0.25], 'fmin': [8.0], 'fmax': [13.0], 'roi': [['PO9', ...]]}

Permutation test options#

Argument

Description

Example

perm_contrasts (default: None)

Contrast(s) between condition labels (see average_by) to compute cluster-based permutation tests for

[('related', 'unrelated')]

perm_tmin (default: 0.0)

Start of time window (in s relative to stimulus onset) for restricting the permutation test

0.0 or None (i.e., use entire epoch)

perm_tmax (default: 1.0)

End of time window (in s relative to stimulus onset) for restricting the permutation test

1.0 or None (i.e., use entire epoch)

perm_channels (default: None)

Selection of channels for restricting the permutation test

['C1', 'Cz', 'C2', ...] or None (i.e., use all channels)

perm_fmin (default: None)

Lowest frequency (in Hz) for restricting the permutation test (event-related power only)

8.0 or None (i.e., use all frequencies)

perm_fmax (default: None)

Highest frequency (in Hz) for restricting the permutation test (event-related power only)

30.0 or None (i.e., use all frequencies)

Performance options#

Argument

Description

Example

n_jobs (default: 1)

Number of jobs (i.e., participants) to be processed in parallel

4 or -1 (i.e., use all CPUs)