Interactive Pop Workflows#

User-facing pop_* wrappers. Each accepts return_com=True and returns a replayable history command.

Loading and Saving#

pop_biosig and pop_fileio accept their options as keywords or as positional name/value pairs. blockrange=[start, stop] requests a half-open, seconds-based read of continuous EDF, BDF, and other MNE-backed formats. A window or a whole recording with fewer samples than channels stays channel-major. BioSemi BDF import decodes Status with bdfeventmode (default 4, rising edges of the lower 16 bits), stores those triggers when importevent is on, and removes Status when rmeventchan is on. A requested time range reads only the overlapping BDF records. pop_fileio also accepts EEGLAB’s 1-based channels selection and inclusive samples and trials ranges. pop_loadset supports metadata-only and 1-based channel loading through loadmode. pop_importpres recognizes tab-delimited Presentation headers and also accepts EEGLAB’s positional event-type, time, and duration field names. pop_read_erpss imports uncompressed and delta-compressed ERPSS .RAW and .RDF recordings. Pass a sampling rate only when timing is absent from the recording header. pop_readegi imports continuous or equal-length segmented EGI Simple Binary RAW files, including event channels and segment categories. An epoc event with no tim0 event is stored as boundary. When both codes are present, every epoc latency is the last sample of a trial, and the sample count divides evenly into one more trial than there are epoc events, the pauses become the trial boundaries and the epoc events are removed. pop_readsegegi joins a numbered continuous series ending in 001.RAW, 002.RAW, and so on, and validates that acquisition headers agree before concatenating samples. pop_importegimat reads EGI Net Station MATLAB exports. Segment variables named <condition>_Segment<number> become trials with one condition event per trial; continuous exports are read from the Session variable by default. An embedded samplingRate takes precedence over the supplied rate, and latpoint0 is expressed in milliseconds.

eegprep.pop_biosig(filename, *args[, return_com])

Import BIOSIG-style EDF/BDF/GDF files, optionally over a time range.

eegprep.pop_chanedit(chans, *args[, gui, ...])

Edit EEG channel-location metadata.

eegprep.pop_editset(EEG, *args[, gui, ...])

Edit dataset metadata fields in an EEG dictionary.

eegprep.pop_expevents(EEG, filename)

Export EEG.event as a tab-delimited text file.

eegprep.pop_export(EEG, filename, *args, ...)

Export EEG data or ICA activity to a delimited text file.

eegprep.pop_exportbids(EEG, output_dir, *[, ...])

Export EEG dataset(s) as BIDS-like EEGLAB files and sidecars.

eegprep.importevent(event[, oldevent, srate])

Import event records from a text table or in-memory rows.

eegprep.pop_importdata(*args[, return_com])

Import data from an array or supported file into an EEG dataset.

eegprep.pop_importegimat(filename[, srate, ...])

Import a segmented or continuous EGI Net Station MATLAB file.

eegprep.pop_importepoch(EEG[, filename, ...])

Import per-epoch metadata and construct its corresponding events.

eegprep.pop_importevent(EEG, *args[, return_com])

Import events from a text table or record array.

eegprep.pop_load_frombids(filename, *[, ...])

Load an EEG data file of a supported format from a BIDS dataset.

eegprep.pop_loadset([file_path, loadmode, ...])

Load an EEGLAB dataset, its metadata, or selected channels.

eegprep.pop_loadset_h5(file_name)

Load EEG data from HDF5 file.

eegprep.pop_read_erpss(filename[, srate, ...])

Import an ERPSS recording into an EEG dictionary.

eegprep.pop_readlocs([filename, return_com])

Read channel locations and return an EEGPrep chanlocs list.

eegprep.pop_readegi(filename[, datachunks, ...])

Import an EGI Simple Binary file.

eegprep.pop_readsegegi(filename, *[, ...])

Import the contiguous 001, 002, .

eegprep.pop_saveh(allcoms[, filename, filepath])

Save dataset or session command history to a script file.

eegprep.pop_saveset(EEG[, file_name])

Save EEG data to file.

eegprep.pop_writeeeg(EEG, filename, *args, ...)

Write continuous EEG data to EDF, BDF, or GDF.

Event and Epoch Tables#

importevent converts standalone event tables into event dictionaries using the same field, delimiter, time-unit, alignment, and append rules as pop_importevent. pop_importevent accepts text files or record sequences and stores the result on an EEG dataset. Imported latencies use seconds by default, timeunit=1e-3 selects milliseconds, and timeunit=numpy.nan selects sample positions. Existing events are appended unless append="no" is supplied. Alignment can anchor imported rows to the existing event stream and optionally compensate for small clock-rate drift; indices uses 1-based event numbers when updating selected rows.

pop_importepoch accepts one row per epoch. It preserves the row metadata in EEG["epoch"] and creates time-locking and latency-field events in EEG["event"]. Event latencies are stored as 1-based absolute samples, and durations are stored as sample counts.

Preprocessing#

eegprep.pop_autorej(EEG, *args[, gui, ...])

Run EEGLAB's automatic epoch rejection protocol.

eegprep.pop_clean_rawdata(EEG, *args[, gui, ...])

Clean continuous EEG data using the clean_rawdata workflow.

eegprep.pop_eegfilt(EEG[, locutoff, ...])

Filter EEG data through the legacy pop_eegfilt interface.

eegprep.pop_eegfiltnew(EEG, *args[, gui, ...])

Filter EEG data using EEGLAB's Hamming-windowed FIR defaults.

eegprep.pop_eegthresh(EEG[, icacomp, ...])

Mark or reject epochs using EEGLAB pop_eegthresh semantics.

eegprep.pop_epoch([EEG, types, lim, gui, ...])

Extract data epochs time locked to event types or event indices.

eegprep.pop_firws(EEG, *args[, gui, ...])

Filter EEG data using a windowed-sinc FIR filter.

eegprep.pop_firwsord([wtype, fs, df, dev, ...])

Estimate a windowed-sinc FIR order.

eegprep.pop_interp([EEG, bad_elec, method, ...])

Interpolate EEG channels using EEGLAB pop_interp semantics.

eegprep.pop_jointprob(EEG[, icacomp, ...])

Mark or reject epochs by local/global joint probability.

eegprep.pop_rejchan(EEG, *args[, gui, ...])

Reject channels by probability, kurtosis, spectrum, or standard deviation.

eegprep.pop_rejchanspec([EEG, return_com])

Reject bad channels from spectral outliers.

eegprep.pop_rejcont(EEG, *args[, gui, ...])

Reject continuous data portions based on high-frequency power.

eegprep.pop_rejepoch(EEG[, tmprej, confirm, ...])

Remove rejected epochs.

eegprep.pop_rejkurt(EEG[, icacomp, ...])

Mark or reject epochs by local/global kurtosis.

eegprep.pop_rejspec(EEG[, icacomp, gui, ...])

Mark or reject epochs by spectral power thresholds.

eegprep.pop_rejtrend(EEG[, icacomp, ...])

Mark or reject epochs containing line-like trends.

eegprep.pop_reref([EEG, ref, gui, renderer, ...])

Convert an EEG dataset to average or common-reference data.

eegprep.pop_resample(EEG[, freq, engine, ...])

Resample EEG data to a new sampling rate.

eegprep.pop_rmbase([EEG, timerange, ...])

Remove baseline means from an epoched or continuous EEG dataset.

eegprep.pop_select(EEG, *args[, gui, ...])

Select EEG data using EEGLAB pop_select semantics.

eegprep.pop_selectcomps(EEG[, compnum, fig, ...])

Inspect components and optionally mark them in EEG.reject.gcompreject.

eegprep.pop_selectevent(EEG, *args[, gui, ...])

Select, rename, or delete events using EEGLAB pop_selectevent semantics.

eegprep.pop_xfirws(*args[, gui, renderer, ...])

Design a FIRFilt windowed-sinc FIR and optionally export an .fir file.

ICA and Components#

eegprep.pop_expica(EEG, filename[, matrix])

Export the ICA weight matrix or inverse weight matrix.

eegprep.pop_icathresh([EEG, threshval, ...])

Set ICA rejection thresholds and update reject.gcompreject.

eegprep.pop_iclabel(EEG[, icversion, gui, ...])

Classify independent components using ICLabel.

eegprep.pop_prop([EEG, typecomp, ...])

Plot properties of one channel or independent component.

eegprep.pop_prop_extended([EEG, typecomp, ...])

Render the EEGLAB viewprops-style extended property dashboard.

eegprep.pop_runica(EEG, *args[, icatype, ...])

Run ICA decomposition with EEGLAB pop_runica calling semantics.

eegprep.pop_subcomp(EEG[, components, ...])

Remove ICA components from data.

eegprep.pop_viewprops(EEG[, typecomp, ...])

Render channel/component property overview figures and activity views.

Plotting and Review#

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

Plot precomputed STUDY channel or component measures.

eegprep.pop_compareerps([ALLEEG, setlist, ...])

Compare ERP averages for selected datasets using pop_comperp.

eegprep.pop_crossf([EEG, typeproc, num1, ...])

Run legacy pop_crossf through EEGPrep's pop_newcrossf implementation.

eegprep.pop_dipplot([EEG, comps, gui, ...])

Plot localized DIPFIT component positions.

eegprep.pop_eegplot([EEG, icacomp, ...])

Inspect EEG channel or component activity in the scrolling browser.

eegprep.pop_envtopo([EEG, timerange, gui, ...])

Plot largest component ERP envelopes and component maps.

eegprep.pop_erpimage([EEG, typeplot, ...])

EEGLAB-style pop_erpimage: an event-related potential (ERP) image of a channel or component.

eegprep.pop_headplot([EEG, typeplot, items, ...])

Plot ERP or component maps on a spline-interpolated 3-D head mesh.

eegprep.pop_newcrossf([EEG, typeproc, num1, ...])

Plot event-related channel/component cross-coherence.

eegprep.pop_newtimef([EEG, typeproc, num, ...])

Plot a channel or component ERSP/ITC decomposition.

eegprep.pop_plotdata([EEG, typeplot, ...])

Plot channel or component activity in a rectangular/scalp array.

eegprep.pop_plottopo([EEG, chans, ...])

Plot channel ERP traces in a rectangular/scalp-like array.

eegprep.pop_spectopo([EEG, dataflag, ...])

Plot channel or component spectra and scalp maps.

eegprep.pop_timtopo([EEG, plottimes, gui, ...])

Plot channel ERP traces and scalp maps at selected latencies.

eegprep.pop_topochansel(chanlocs[, select, ...])

Select channels by label/index using EEGPrep's channel selector.

eegprep.pop_topoplot([EEG, typeplot, items, ...])

Plot EEGLAB-style 2-D scalp maps for ERP latencies or ICA components.

pop_erpimage follows EEGLAB’s pop_erpimage arguments (typeplot, channel, projchan, titleplot, smooth, decimate, sortingtype, sortingwin, sortingeventfield and then any erpimage option), sorts the trials by event values with eeg_getepochevent, and returns the erpimage result described under ERP images. Unlike erpimage, it draws the ERP trace, a colorbar and a scalp map by default. Its lastcom= keyword reopens the dialog with an earlier history command, as the Plot menu does.

newtimef accepts EEGLAB’s default outputformat='plot' option; other output layouts are not yet implemented.

STUDY#

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

Cluster STUDY component rows in STUDY.etc.preclust.

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

Run cluster edit and plotting actions on STUDY.cluster.

eegprep.pop_loadstudy([filename, filepath, ...])

Load a STUDY JSON file saved by pop_savestudy.

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

Prepare a STUDY component clustering matrix.

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

Precompute STUDY channel or component measures.

eegprep.pop_savestudy(STUDY[, EEG, ...])

Save a STUDY structure as an EEGPrep JSON .study file.

eegprep.pop_study([STUDY, ALLEEG, name, ...])

Create or edit a STUDY structure from loaded EEG datasets.

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

Edit STUDY designs and select the current design.

eegprep.pop_studyerp([ALLEEG, return_com])

Create a STUDY marked as a simple ERP design.

eegprep.pop_studywizard(filenames, *[, ...])

Load selected datasets and create a STUDY.

Other#

eegprep.pop_addindepvar(varlist[, fig, var, ...])

Return (variable, values, categorical_flag) for STUDY designs.

eegprep.pop_adjustevents(EEG, *args[, ...])

Adjust event offset of all or selected events.

eegprep.pop_averef([EEG, confirm, return_com])

Convert data to average reference through pop_reref(EEG, []).

eegprep.pop_chancenter(chans[, center, ...])

Recenter channel locations using a known or optimized sphere center.

eegprep.pop_chancoresp(chans1, chans2, *args)

Return 1-based channel correspondences by label.

eegprep.pop_chanevent(EEG, chan, *args[, ...])

Import events from rising, falling, or both edges of data channels.

eegprep.pop_chansel(chans, *[, withindex, ...])

Open an EEGLAB pop_chansel-style channel selector.

eegprep.pop_comments(EEG[, plottitle, ...])

Edit or assign dataset comments.

eegprep.pop_comperp([ALLEEG, flag, datadd, ...])

Compute and plot grand-average ERPs across loaded datasets.

eegprep.pop_copyset(ALLEEG, set_in[, ...])

Copy dataset set_in to set_out using EEGLAB-facing indices.

eegprep.pop_delset(ALLEEG, indices)

Delete datasets from ALLEEG and return a history command.

eegprep.pop_dipfit_gridsearch([EEG, select, ...])

Run a standalone spherical coarse grid search for ICA components.

eegprep.pop_dipfit_headmodel([EEG, mriFile, ...])

Validate headmodel inputs, then fail clearly until FieldTrip is ported.

eegprep.pop_dipfit_loreta([EEG, select, ...])

Validate LORETA prerequisites, then fail clearly until a backend exists.

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

Run standalone nonlinear dipole refinement for one component.

eegprep.pop_dipfit_settings([EEG, gui, ...])

Configure DIPFIT settings without requiring an EEGLAB runtime.

eegprep.pop_editeventfield(EEG, *args[, ...])

Add, remove, rename, or update fields in EEG.event.

eegprep.pop_editeventvals(EEG, *args[, gui, ...])

Edit individual EEG.event values.

eegprep.pop_editoptions(*args, **updates)

Update EEGPrep's EEGLAB-compatible options.

eegprep.pop_eventstat([EEG, eventfield, ...])

Compute and plot statistics for numeric EEG event fields.

eegprep.pop_fileio(filename, *args[, return_com])

Import an EEG file, optionally selecting 1-based channels, samples, or trials.

eegprep.pop_fileio_brainvision_mat(filename, *)

Import a BrainVision Analyzer MATLAB file.

eegprep.pop_findmatchingcomps([EEG, return_com])

Find current-dataset components matching another set of scalp maps.

eegprep.pop_firma(EEG, *args[, gui, ...])

Filter EEG data using a moving-average FIR filter.

eegprep.pop_firpm(EEG, *args[, gui, ...])

Filter EEG data using a Parks-McClellan equiripple FIR filter.

eegprep.pop_firpmord([f, a, dev, fs, gui, ...])

Estimate Parks-McClellan FIR order and pass/stop weights.

eegprep.pop_fusechanrej([EEG, return_com])

Keep only common channels across datasets with the same subject/session.

eegprep.pop_icflag(EEG[, thresholds, gui, ...])

Flag ICLabel-classified components for later rejection.

eegprep.pop_importbids(path, *[, return_com])

Load one or more EEG files from a BIDS dataset.

eegprep.pop_importerplab(EEG[, filename, ...])

Import an ERPLAB-style event text file through the generic event importer.

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

Attach one imported variable value per STUDY subject.

eegprep.pop_importpres(EEG[, filename, ...])

Import a Presentation LOG file using its named event columns.

eegprep.pop_kaiserbeta([dev, gui, renderer, ...])

Estimate Kaiser window beta from passband ripple.

eegprep.pop_leadfield([EEG, gui, renderer, ...])

Compute a standalone spherical leadfield for explicit source points.

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

Fit first-level models for every selected STUDY dataset.

eegprep.pop_limoresults(STUDY[, source, ...])

Compute and retain one standalone LIMO second-level result.

eegprep.pop_listfactors(des, *args[, return_com])

Return factor descriptors for one STUDY or design structure.

eegprep.pop_loadbci(filename[, srate, ...])

Import a BCI2000-style file into an EEG dictionary.

eegprep.pop_mergeset(INEEG1[, INEEG2, ...])

Merge two or more EEG datasets.

eegprep.pop_multifit([EEG, comps, gui, ...])

Fit multiple ICA components using grid search and nonlinear refinement.

eegprep.pop_newset(ALLEEG, EEG, CURRENTSET, ...)

Store or retrieve datasets following EEGLAB's pop_newset contract.

eegprep.pop_read_erpss(filename[, srate, ...])

Import an ERPSS recording into an EEG dictionary.

eegprep.pop_rejmenu(EEG[, icacomp, gui, ...])

Open a compact rejection menu that combines stored non-browser marks.

eegprep.pop_rmdat(EEG[, events, timelims, ...])

Keep or remove continuous data around event types.

eegprep.pop_runscript(filename[, namespace])

Run a Python history script selected by the user.

eegprep.pop_signalstat([EEG, typeproc, ...])

Compute and plot statistics for one channel or component.

eegprep.pop_snapread(filename[, gain, ...])

Import a SnapMaster .SMA file.

eegprep.pop_timef([EEG, typeproc, num, ...])

Run legacy pop_timef through EEGPrep's pop_newtimef implementation.

eegprep.pop_writelocs(chans[, filename, ...])

Write channel locations and return a replayable history command.