STUDY Workflows#

Group-level STUDY functions for design, clustering, measures, and plotting.

Study Setup and Validation#

eegprep.std_addvarlevel(STUDY[, designind])

Return STUDY with one/two design-variable levels.

eegprep.std_builddesignmat(design, trialinfo)

Build a design matrix from a STUDY design and trial metadata.

eegprep.std_checkconsist(STUDY, *args[, ...])

Check whether each value of a STUDY factor has the same subject count.

eegprep.std_checkdatasession(STUDY[, ...])

Check dataset/session alignment for a STUDY and loaded ALLEEG.

eegprep.std_checkdatasetinfo(STUDY, ALLEEG)

Return STUDY.datasetinfo consistency checks for loaded datasets.

eegprep.std_checkdesign(STUDY[, designind])

Return 1 when a design has no continuous variables or multi-valued extras.

eegprep.std_checkfiles(STUDY[, ALLEEG, ...])

Check loaded STUDY data and cached measures for standalone EEGPrep.

eegprep.std_checkset(STUDY, ALLEEG, *[, ...])

Normalize a STUDY dict and refresh dataset/design consistency metadata.

eegprep.std_combtrialinfo(datasetinfo, inds)

Return trial rows enriched with selected datasetinfo fields.

eegprep.std_editset(STUDY, ALLEEG, *args[, ...])

Modify STUDY metadata and datasetinfo entries.

eegprep.std_findgroupvars(STUDY)

Return dataset variables that are constant within each subject.

eegprep.std_maketrialinfo(STUDY, ALLEEG)

Populate STUDY.datasetinfo[*].trialinfo from loaded EEG metadata.

eegprep.std_rebuilddesign(STUDY[, ALLEEG, ...])

Refresh STUDY design variables after dataset metadata changes.

eegprep.std_selectdataset(STUDY, ALLEEG[, ...])

Return selected 1-based dataset indices and trial indices.

eegprep.std_uniformfiles(STUDY, ALLEEG)

Return 1 for uniform channels, 0 for mismatch, -1 for missing files.

eegprep.std_uniformsetinds(STUDY)

Return 1 when STUDY channel group set indices are uniform.

Clustering#

eegprep.std_apcluster(clustdata, *[, ...])

Cluster rows using deterministic affinity propagation updates.

eegprep.std_centroid(data[, labels])

Return centroids for all rows or for each positive label.

eegprep.std_clustplot(STUDY, ALLEEG[, ...])

Plot a compact cluster summary for GUI and console workflows.

eegprep.std_createclust(STUDY, ALLEEG, *, ...)

Create child clusters from one cluster label per preclustering row.

eegprep.std_dipoleclusters(*args, **kwargs)

Report the standalone boundary for STUDY dipole-cluster workflows.

eegprep.std_findoutlierclust(data[, labels, ...])

Return 1-based row indices farther than threshold cluster spreads.

eegprep.std_mergeclust(STUDY, ALLEEG, mrg_cls)

Merge two or more 1-based STUDY clusters into a new child cluster.

eegprep.std_moveoutlier(STUDY, ALLEEG, ...)

Move component positions from a cluster into its outlier cluster.

eegprep.std_preclust(STUDY, ALLEEG[, ...])

Build the PCA-reduced matrix used by pop_clust.

eegprep.std_readtopo(STUDY[, ALLEEG, ...])

Read cached STUDY component scalp topographies.

eegprep.std_rejectoutliers(STUDY, ALLEEG[, ...])

Move components farther than th cluster-distance stds to outliers.

eegprep.std_renameclust(STUDY, ALLEEG, cls, ...)

Rename one 1-based STUDY cluster and update parent/child links.

Measures#

eegprep.std_erpplot(STUDY, ALLEEG, *args, ...)

Read and plot precomputed STUDY ERP measures.

eegprep.std_erspplot(STUDY, ALLEEG, *args, ...)

Read and plot precomputed STUDY ERSP measures.

eegprep.std_interp(STUDY, ALLEEG[, chans, ...])

Interpolate selected missing channels into every STUDY dataset.

eegprep.std_itcplot(STUDY, ALLEEG, *args, ...)

Read and plot precomputed STUDY ITC measures.

eegprep.std_precomp(STUDY, ALLEEG[, ...])

Precompute ERP, spectrum, ERSP, and ITC measures for a STUDY.

eegprep.std_readdata(STUDY[, ALLEEG, ...])

Read precomputed STUDY measures from EEGPrep's in-memory cache.

eegprep.std_readerp(STUDY[, ALLEEG])

Read cached STUDY ERP measures.

eegprep.std_readersp(STUDY[, ALLEEG])

Read cached STUDY ERSP measures.

eegprep.std_readfilelimo(*args, **kwargs)

Report that standalone EEGPrep does not parse external LIMO files.

eegprep.std_readitc(STUDY[, ALLEEG])

Read cached STUDY ITC measures.

eegprep.std_readspec(STUDY[, ALLEEG])

Read cached STUDY spectrum measures.

eegprep.std_specplot(STUDY, ALLEEG, *args, ...)

Read and plot precomputed STUDY spectrum measures.

Plotting#

eegprep.std_dipplot(*args, **kwargs)

Report the standalone boundary for STUDY-level source plotting.

eegprep.std_pacplot(STUDY, ALLEEG, *args[, ...])

Read and optionally plot precomputed STUDY PAC measures.

Other#

eegprep.std_findsameica(ALLEEG[, icathreshold])

Group 1-based dataset indices with near-identical ICA weights*sphere.

eegprep.std_getindvar(STUDY[, mode, scandesign])

Return STUDY factor names, values, subject groupings, and pairing flags.

eegprep.std_gettrialsind(trialinfo, *args[, ...])

Return 1-based trial indices matching all requested trialinfo values.

eegprep.std_indvarmatch(value, valuelist)

Return 1-based indices where an independent-variable value matches.

eegprep.std_limo(*args, **kwargs)

Report that standalone EEGPrep does not run external LIMO models.

eegprep.std_limodesign(factors, trialinfo, *args)

Create LIMO-compatible categorical and continuous design matrices.

eegprep.std_limoresults(*args, **kwargs)

Report that standalone EEGPrep does not compute external LIMO results.

eegprep.std_makedesign(STUDY, ALLEEG[, ...])

Create or replace a 1-based STUDY design.

eegprep.std_movecomp(STUDY, ALLEEG, ...[, ...])

Move component positions from one 1-based STUDY cluster to another.

eegprep.std_pac(EEG_or_STUDY[, ALLEEG, ...])

Compute phase-amplitude coupling for an EEG dataset or STUDY.

eegprep.std_prepare_neighbors(STUDY, ALLEEG, ...)

Prepare a FieldTrip-like neighbor list and LIMO adjacency matrix.

eegprep.std_readpac(STUDY[, ALLEEG, ...])

Read EEGPrep-owned cached STUDY PAC data when present.

eegprep.std_rmalldatafields(STUDY[, chanorcomp])

Return STUDY without cached measure/data fields for the requested target.

eegprep.std_rmdat(STUDY, ALLEEG, *args[, ...])

Remove datasets from STUDY/ALLEEG and return removed 1-based indices.

eegprep.std_savedat(tmpfile, structure)

Save a measure structure as JSON or MATLAB-compatible MAT data.

eegprep.std_saveindvar(STUDY, *[, return_com])

Save factor descriptors under STUDY.etc.eegprep.independent_variables.

eegprep.std_selectdesign(STUDY, ALLEEG, ...)

Select a 1-based STUDY design index.

eegprep.std_selsubject(data, subject, ...[, ...])

Return cached-measure cells with only the requested subject columns.

eegprep.std_substudy(STUDY, ALLEEG, *args[, ...])

Return a STUDY/ALLEEG subset using EEGLAB-facing 1-based selectors.