eelbrain.pipeline.Pipeline

class eelbrain.pipeline.Pipeline(root, screen_log_level=None, **state)

Analyze an MEG or EEG experiment

Parameters:
  • root (str | None) – the root directory for the experiment (usually the directory containing the ‘meg’ and ‘mri’ directories). The experiment can be initialized without the root for testing purposes.

  • find_subjects (bool) – Automatically look for subjects in the MEG-directory (default True). Set find_subjects=False to initialize the experiment without any files.

  • ... – Initial state parameters.

  • screen_log_level (str | int)

Notes

See also

Guide on using The Pipeline.

Methods

fix_events(ds)

Modify event order or timing

format(string[, vmatch])

Format a string with the current state values.

get(temp[, vmatch, match, mkdir])

get_field_values(field[, exclude])

Find values for a field taking into account exclusion

inv_str([ori, snr, method, depth, pick_normal])

Construct inv string from settings; see set_inv()

iter([fields, exclude, values, progress_bar])

Cycle the experiment's state through all values on the given fields

iter_range([start, stop, field])

Iterate through a range on a field with ordered values.

label_events(ds)

Add event labels to events loaded from raw files

label_groups(subject, groups)

Generate Factor for group membership

label_subjects(ds)

Label the subjects in ds

load_annot(**state)

Load a parcellation (from an annot file)

load_bad_channels([noise])

Load bad channels

load_cov(**kwargs)

Load the covariance matrix

load_epochs([subjects, baseline, ndvar, ...])

Load a Dataset with epochs for a given epoch definition

load_epochs_stc([subjects, baseline, ...])

Load a Dataset with stcs for single epochs

load_events([subject])

Load events from a raw file.

load_evoked([subjects, baseline, ndvar, ...])

Load a Dataset with condition average responses for each subject.

load_evoked_stc([subjects, baseline, ...])

Load evoked source estimates.

load_fwd([surf_ori, ndvar])

Load the forward solution

load_ica([accept_stale])

Load the mne-python ICA object

load_induced_stc([subjects, frequencies, ...])

Morlet wavelet induced power and phase in source space.

load_inv([fiff, ndvar])

Load the inverse operator

load_label(label, **kwargs)

Retrieve a label as mne Label object

load_neighbor_correlation([subjects, epoch, ...])

Load sensor neighbor correlation

load_raw([preload, ndvar, samplingrate, ...])

Load a raw file as mne Raw object.

load_raw_stc([morph, ndvar, samplingrate, ...])

Apply the inverse solution to the raw signal and return source estimates.

load_selected_events([subjects, reject, ...])

Load events and return a subset based on epoch and rejection

load_source_morph(**state)

Load the source morph from mrisubject to common_brain

load_src([add_geom, ndvar])

Load the current source space

load_test(test[, tstart, tstop, pmin, ...])

Create and load spatio-temporal cluster test results

make_annot(**state)

Ensure that annot files for the current parcellation exist.

make_bad_channels([bad_chs, redo, noise])

Write the bad channel definition file for a raw file

make_bad_channels_auto([flat, redo, noise])

Automatically detect bad channels

make_bad_channels_neighbor_correlation(r[, ...])

Iteratively exclude bad channels based on low average neighbor-correlation

make_epoch_selection([samplingrate, auto, ...])

Open gui.select_epochs() for manual epoch selection

make_ica(**state)

Compute ICA decomposition for a pipeline.RawICA preprocessing step

make_ica_selection([epoch, samplingrate, ...])

Select ICA components to remove through a GUI

make_movie_dspm([subjects, baseline, ...])

Make a grand average movie from dSPM values (requires PySurfer 0.6)

make_movie_ttest([subjects, model, c1, c0, ...])

Make a t-test movie (requires PySurfer 0.6)

make_plot_annot([surf, redo])

Create a figure for the contents of an annotation file

make_plot_label(label[, surf, redo])

make_plots_labels([surf, redo])

make_report(test[, disconnect_labels, pmin, ...])

Create an HTML report on spatio-temporal clusters

make_report_coreg([file_name])

Create HTML report with plots of the MEG/MRI coregistration

make_report_rois(test[, pmin, tstart, ...])

Create an HTML report on ROI time courses

make_src(**state)

Make the source space

merge_bad_channels()

Merge bad channel definitions for different tasks

next([field])

Change field to the next value

plot_annot([parc, surf, views, hemi, ...])

Plot the annot file on which the current parcellation is based

plot_brain([common_brain, hemi])

Plot the brain model

plot_coregistration([surfaces, meg, dig, ...])

Plot the coregistration (Head shape and MEG helmet)

plot_evoked([subjects, data, separate, ...])

Plot evoked sensor data

plot_label(label[, surf, views, w])

Plot a label

plot_raw([decim, xlim, subtract_mean])

Plot raw sensor data

plot_whitened_gfp([s_start, s_stop, run])

Plot the GFP of the whitened evoked to evaluate the the covariance matrix

reset()

Reset all field values to the state at initialization

run_mne_analyze([modal])

Run mne_analyze

run_mne_browse_raw([modal])

Run mne_analyze

set([subject, match])

Set variable values.

set_inv([ori, snr, method, depth, pick_normal])

Set the type of inverse solution used for source estimation

show_bad_channels([tasks])

List bad channels

show_dependencies(name[, options, ...])

Show the dependency tree for one registered input or derivative.

show_fields([constants])

A table for all iterable fields and their values.

show_head_position_overview([tolerance, asds])

Overview of head position (dev_head_t) across tasks, subjects and sessions.

show_raw_info(**state)

Display the selected pipeline for raw processing

show_reg_params([asds])

Show the covariance matrix regularization parameters

show_rej_info([flagp, asds, bads])

Information about artifact rejection

show_state([temp, empty, hide])

List field values.

show_subjects([raw, mri, mrisubject, ...])

Create a Dataset with subject information