Input arguments#

Input file paths#

Argument

Description

Python example

R example

vhdr_files (required)

List of raw EEG file paths

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

c("raw/Vp01.vhdr", "raw/Vp02.vhdr", ...)

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

['raw/Vp01.vhdr', ['raw/Vp02_a.vhdr', 'raw/Vp02_b.vhdr'], ...]

list("raw/Vp01.vhdr", c("raw/Vp02_a.vhdr", "raw/Vp02_b.vhdr"), ...)

Directory path with raw EEG files

'raw'

"raw"

log_files (required)

List of behavioral log file paths

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

c("log/Vp01.txt", "log/Vp02.txt", ...)

Directory of raw EEG files

'log'

"log"

Output file paths#

Argument

Description

Python example

R example

output_dir (required)

Output directory

'data/output'

"data/output"

clean_dir (default: None)

Cleaned (continuous) data output directory

'data/clean'

"data/clean"

epochs_dir (default: None)

Epoched data output directory

'data/clean'

"data/clean"

report_dir (default: None)

HTML quality control report output directory

'data/reports'

"data/reports"

to_df (default: True)

Save outputs as data frames with comma-separated values or

True

TRUE

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

False

FALSE

Save outputs as data frames and MNE-Python files

'both'

"both"

Preprocessing options#

Argument

Description

Python example

R example

downsample_sfreq (default: None)

Downsample to lower sampling rate or

250.0

250.0

Do not downsample

None

NULL

veog_channels (default: 'auto')

Construct bipolar VEOG from two EEG or EOG channels or

['Fp1', 'IO1']

c("Fp1", "IO1")

Construct VEOG from default channels or

'auto'

"auto"

Do not construct a new VEOG channel

None

NULL

heog_channels (default: 'auto')

Construct bipolar HEOG from two EEG or EOG channels or

['F9', 'F10']

c("F9", "F10")

Construct HEOG from default channels or

'auto'

"auto"

Do not construct a new HEOG channel

None

NULL

montage (default: 'easycap-M1')

Standard EEG montage name or

'easycap-M1'

"easycap-M1"

Custom EEG montage file path

'data/chanlocs.elc'

"data/chanlocs.elc"

ref_channels (default: 'average')

List of channels to re-reference EEG channels to or

['M1', 'M2']

c("M1", "M2")

Re-reference EEG channels to an average reference or

'average'

"average"

Use the Reference Electrode Standardization Technique (REST)

'REST'

"REST"

bad_channels (default: None)

Lists of bad channels for each participant or

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

list(c("P7", "Oz"), c("Fp2"), ...)

Dict with participant labels and their list of bad channels or

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

list("Vp05" = c("PO8", "O2"))

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

'auto'

"auto"

Don’t interpolate any bad channels

None

NULL

besa_files (default: None)

Directory of BESA/MSEC correction matrix files or

'data/cali'

"data/cali"

List of BESA/MSEC correction matrix file paths or

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

c("data/cali/Vp01.matrix", "data/cali/Vp02.matrix", ...)

Don’t use BESA/MSEC ocular correction

None

NULL

ica_method (default: None)

ICA method or

'fastica' or 'infomax' or 'picard'

"fastica" or "infomax" or "picard"

Don’t apply ICA

None

NULL

ica_n_components (default: None)

Number of ICA components to use or

15

15

Proportion of variance explained by ICA components or

0.99

0.99

Use (almost) all possible ICA components

None

NULL

highpass_freq (default: 0.1)

High-pass filter cutoff frequency or

0.1

0.1

Do not apply high-pass filter

None

NULL

lowpass_freq (default: 40.0)

Low-pass filter cutoff frequency or

40.0

40.0

Do not apply low-pass filter

None

NULL

Epoching options#

Argument

Description

Python example

R example

triggers (recommended, default: None)

Numerical EEG triggers for events of interest

[201, 202]

c(201, 202)

triggers_column (default: None)

Name of log file column with EEG triggers for automatic matching

'trigger'

"trigger"

epochs_tmin (default: -0.5)

Start of epochs relative to event onset (in s)

-0.5

-0.5

epochs_tmax (default: 1.5)

End of epochs relative to event onset (in s)

1.5

1.5

baseline (default: (-0.2, 0.0))

Time window for baseline correction (in s) or

(-0.2, 0.0)

c(-0.2, 0.0)

Use entire prestimulus interval or

(None, 0.0)

c(NULL, 0.0)

Do not perform baseline correction

None

NULL

reject_peak_to_peak (default: 200.0)

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

200.0

200.0

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

None

NULL

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', ...]]}

list(name = list("P1", "N170"), tmin = list(0.08, 0.15), tmax = list(0.13, 0.2), roi = list(c("PO3", ...), c("P7", ...)))

Averaging options#

Argument

Description

Python example

R 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', ...}

list(neg_unrel = "context == 'negative' & semantics == 'unrelated' & rt < 3000", ...)

Time-frequency analsis options#

Argument

Description

Python example

R example

perform_tfr (default: False)

Enable time-frequency analysis or

True or False

TRUE or FALSE

tfr_subtract_evoked (default: False)

Subtract evoked activity from epochs before time-frequency analysis or

True or False

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)

seq(6.0, 40.0, by = 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)

seq(2.0, 20.0, by = 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

"percent" or "ratio" or "logratio" or "zscore" or "zlogratio" or NULL

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

Time window for subtractive baseline correction of event-related power

(-0.45, -0.05)

c(-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', ...]]}

list(name = list("alpha"), tmin = list(0.05), tmax = list(0.25), fmin = list(8.0), fmax = list(13.0), roi = list(c("PO9", ...)))

Permutation test options#

Argument

Description

Python example

R example

perm_contrasts (default: None)

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

[('related', 'unrelated')]

list(c("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)

0.0 or NULL (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)

1.0 or NULL (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)

c("C1", "Cz", "C2", ...) or NULL (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)

8.0 or NULL (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)

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

Performance options#

Argument

Description

Python example

R example

n_jobs (default: 1)

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

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

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