Preprocessing#

Projections:

Projection(*, data[, desc, kind, active, ...])

Dictionary-like object holding a projection vector.

compute_proj_epochs(epochs[, n_grad, n_mag, ...])

Compute SSP (signal-space projection) vectors on epoched data.

compute_proj_evoked(evoked[, n_grad, n_mag, ...])

Compute SSP (signal-space projection) vectors on evoked data.

compute_proj_raw(raw[, start, stop, ...])

Compute SSP (signal-space projection) vectors on continuous data.

read_proj(fname[, verbose])

Read projections from a FIF file.

write_proj(fname, projs, *[, overwrite, verbose])

Write projections to a FIF file.

mne.channels:

Module dedicated to manipulation of channels.

Can be used for setting of sensor locations used for processing and plotting.

Layout(box, pos, names, ids, kind)

Sensor layouts.

DigMontage(*[, dig, ch_names])

Montage for digitized electrode and headshape position data.

compute_native_head_t(montage, *[, ...])

Compute the native-to-head transformation for a montage.

fix_mag_coil_types(info[, use_cal])

Fix magnetometer coil types.

read_polhemus_fastscan(fname[, unit, ...])

Read Polhemus FastSCAN digitizer data from a .txt file.

get_builtin_montages(*[, descriptions])

Get a list of all standard montages shipping with MNE-Python.

make_dig_montage([ch_pos, nasion, lpa, rpa, ...])

Make montage from arrays.

read_dig_polhemus_isotrak(fname[, ch_names, ...])

Read Polhemus digitizer data from a file.

read_dig_captrak(fname)

Read electrode locations from CapTrak Brain Products system.

read_dig_dat(fname)

Read electrode positions from a *.dat file.

read_dig_egi(fname)

Read electrode locations from EGI system.

read_dig_fif(fname)

Read digitized points from a .fif file.

read_dig_hpts(fname[, unit])

Read historical .hpts MNE-C files.

read_dig_localite(fname[, nasion, lpa, rpa])

Read Localite .csv file.

make_standard_montage(kind[, head_size])

Read a generic (built-in) standard montage that ships with MNE-Python.

read_custom_montage(fname[, head_size, ...])

Read a montage from a file.

compute_dev_head_t(montage)

Compute device to head transform from a DigMontage.

read_layout([fname, scale])

Read layout from a file.

find_layout(info[, ch_type, exclude])

Choose a layout based on the channels in the info 'chs' field.

make_eeg_layout(info[, radius, width, ...])

Create .lout file from EEG electrode digitization.

make_grid_layout(info[, picks, n_col])

Generate .lout file for custom data, i.e., ICA sources.

find_ch_adjacency(info, ch_type)

Find the adjacency matrix for the given channels.

get_builtin_ch_adjacencies(*[, descriptions])

Get a list of all FieldTrip neighbor definitions shipping with MNE.

read_ch_adjacency(fname[, picks])

Read a channel adjacency ("neighbors") file that ships with MNE.

equalize_channels(instances[, copy, verbose])

Equalize channel picks and ordering across multiple MNE-Python objects.

unify_bad_channels(insts)

Unify bad channels across a list of instances.

rename_channels(info, mapping[, ...])

Rename channels.

generate_2d_layout(xy[, w, h, pad, ...])

Generate a custom 2D layout from xy points.

make_1020_channel_selections(info[, ...])

Map hemisphere names to corresponding EEG channel names or indices.

combine_channels(inst, groups[, method, ...])

Combine channels based on specified channel grouping.

mne.preprocessing:

Preprocessing with artifact detection, SSP, and ICA.

ICA([n_components, noise_cov, random_state, ...])

Data decomposition using Independent Component Analysis (ICA).

Xdawn([n_components, signal_cov, ...])

Implementation of the Xdawn Algorithm.

EOGRegression([picks, exclude, ...])

Remove EOG artifact signals from other channels by regression.

annotate_amplitude(raw[, peak, flat, ...])

Annotate raw data based on peak-to-peak amplitude.

annotate_break(raw[, events, ...])

Create Annotations for breaks in an ongoing recording.

annotate_movement(raw, pos[, ...])

Detect segments with movement.

annotate_muscle_zscore(raw[, threshold, ...])

Create annotations for segments that likely contain muscle artifacts.

annotate_nan(raw, *[, verbose])

Detect segments with NaN and return a new Annotations instance.

compute_average_dev_head_t(raw, pos, *[, ...])

Get new device to head transform based on good segments.

compute_current_source_density(inst[, ...])

Get the current source density (CSD) transformation.

compute_bridged_electrodes(inst[, ...])

Compute bridged EEG electrodes using the intrinsic Hjorth algorithm.

compute_fine_calibration(raw[, n_imbalance, ...])

Compute fine calibration from empty-room data.

compute_maxwell_basis(info[, origin, ...])

Compute the SSS basis for a given measurement info structure.

compute_proj_ecg(raw[, raw_event, tmin, ...])

Compute SSP (signal-space projection) vectors for ECG artifacts.

compute_proj_eog(raw[, raw_event, tmin, ...])

Compute SSP (signal-space projection) vectors for EOG artifacts.

compute_proj_hfc(info[, order, picks, ...])

Generate projectors to perform homogeneous/harmonic correction to data.

cortical_signal_suppression(evoked[, picks, ...])

Apply cortical signal suppression (CSS) to evoked data.

create_ecg_epochs(raw[, ch_name, event_id, ...])

Conveniently generate epochs around ECG artifact events.

create_eog_epochs(raw[, ch_name, event_id, ...])

Conveniently generate epochs around EOG artifact events.

find_bad_channels_lof(raw[, n_neighbors, ...])

Find bad channels using Local Outlier Factor (LOF) algorithm.

find_bad_channels_maxwell(raw[, limit, ...])

Find bad channels using Maxwell filtering.

find_ecg_events(raw[, event_id, ch_name, ...])

Find ECG events by localizing the R wave peaks.

find_eog_events(raw[, event_id, l_freq, ...])

Locate EOG artifacts.

fix_stim_artifact(inst[, events, event_id, ...])

Eliminate stimulation's artifacts from instance.

ica_find_ecg_events(raw, ecg_source[, ...])

Find ECG peaks from one selected ICA source.

ica_find_eog_events(raw[, eog_source, ...])

Locate EOG artifacts from one selected ICA source.

infomax(data[, weights, l_rate, block, ...])

Run (extended) Infomax ICA decomposition on raw data.

interpolate_bridged_electrodes(inst, bridged_idx)

Interpolate bridged electrode pairs.

equalize_bads(insts[, interp_thresh, copy])

Interpolate or mark bads consistently for a list of instances.

maxwell_filter(raw[, origin, int_order, ...])

Maxwell filter data using multipole moments.

maxwell_filter_prepare_emptyroom(raw_er, *, raw)

Prepare an empty-room recording for Maxwell filtering.

oversampled_temporal_projection(raw[, ...])

Denoise MEG channels using leave-one-out temporal projection.

peak_finder(x0[, thresh, extrema, verbose])

Noise-tolerant fast peak-finding algorithm.

read_ica(fname[, verbose])

Restore ICA solution from fif file.

read_eog_regression(fname)

Read an EOG regression model from an HDF5 file.

realign_raw(raw, other, t_raw, t_other[, ...])

Realign two simultaneous recordings.

regress_artifact(inst[, picks, exclude, ...])

Remove artifacts using regression based on reference channels.

corrmap(icas, template[, threshold, label, ...])

Find similar Independent Components across subjects by map similarity.

read_ica_eeglab(fname, *[, montage_units, ...])

Load ICA information saved in an EEGLAB .set file.

read_fine_calibration(fname)

Read fine calibration information from a .dat file.

write_fine_calibration(fname, calibration)

Write fine calibration information to a .dat file.

mne.preprocessing.nirs:

NIRS specific preprocessing functions.

optical_density(raw, *[, verbose])

Convert NIRS raw data to optical density.

beer_lambert_law(raw[, ppf])

Convert NIRS optical density data to haemoglobin concentration.

source_detector_distances(info[, picks])

Determine the distance between NIRS source and detectors.

short_channels(info[, threshold])

Determine which NIRS channels are short.

scalp_coupling_index(raw[, l_freq, h_freq, ...])

Calculate scalp coupling index.

temporal_derivative_distribution_repair(raw, *)

Apply temporal derivative distribution repair to data.

mne.preprocessing.ieeg:

Intracranial EEG specific preprocessing functions.

project_sensors_onto_brain(info, trans, subject)

Project sensors onto the brain surface.

make_montage_volume(montage, base_image[, ...])

Make a volume from intracranial electrode contact locations.

warp_montage(montage, moving, static, ...[, ...])

Warp a montage to a template with image volumes using SDR.

mne.preprocessing.eyetracking:

Eye tracking specific preprocessing functions.

Calibration(*, onset, model, eye, avg_error, ...)

Eye-tracking calibration info.

read_eyelink_calibration(fname[, ...])

Return info on calibrations collected in an eyelink file.

set_channel_types_eyetrack(inst, mapping)

Define sensor type for eyetrack channels.

convert_units(inst, calibration[, to])

Convert Eyegaze data from pixels to radians of visual angle or vice versa.

get_screen_visual_angle(calibration)

Calculate the radians of visual angle that the participant screen subtends.

interpolate_blinks(raw[, buffer, match, ...])

Interpolate eyetracking signals during blinks.

EEG referencing:

add_reference_channels(inst, ref_channels[, ...])

Add reference channels to data that consists of all zeros.

set_bipolar_reference(inst, anode, cathode)

Re-reference selected channels using a bipolar referencing scheme.

set_eeg_reference(inst[, ref_channels, ...])

Specify which reference to use for EEG data.

mne.filter:

IIR and FIR filtering and resampling functions.

construct_iir_filter(iir_params[, f_pass, ...])

Use IIR parameters to get filtering coefficients.

create_filter(data, sfreq, l_freq, h_freq[, ...])

Create a FIR or IIR filter.

estimate_ringing_samples(system[, max_try])

Estimate filter ringing.

filter_data(data, sfreq, l_freq, h_freq[, ...])

Filter a subset of channels.

notch_filter(x, Fs, freqs[, filter_length, ...])

Notch filter for the signal x.

resample(x[, up, down, axis, window, ...])

Resample an array.

mne.chpi

Functions for fitting head positions with (c)HPI coils.

compute_chpi_amplitudes(raw[, t_step_min, ...])

Compute time-varying cHPI amplitudes.

compute_chpi_snr(raw[, t_step_min, ...])

Compute time-varying estimates of cHPI SNR.

compute_chpi_locs(info, chpi_amplitudes[, ...])

Compute locations of each cHPI coils over time.

compute_head_pos(info, chpi_locs[, ...])

Compute time-varying head positions.

extract_chpi_locs_ctf(raw[, verbose])

Extract cHPI locations from CTF data.

extract_chpi_locs_kit(raw[, stim_channel, ...])

Extract cHPI locations from KIT data.

filter_chpi(raw[, include_line, t_step, ...])

Remove cHPI and line noise from data.

get_active_chpi(raw, *[, on_missing, verbose])

Determine how many HPI coils were active for a time point.

get_chpi_info(info[, on_missing, verbose])

Retrieve cHPI information from the data.

head_pos_to_trans_rot_t(quats)

Convert Maxfilter-formatted head position quaternions.

read_head_pos(fname)

Read MaxFilter-formatted head position parameters.

write_head_pos(fname, pos)

Write MaxFilter-formatted head position parameters.

mne.transforms

Helpers for various transformations.

Transform(fro, to[, trans])

A transform.

quat_to_rot(quat)

Convert a set of quaternions to rotations.

rot_to_quat(rot)

Convert a set of rotations to quaternions.

read_ras_mni_t(subject[, subjects_dir])

Read a subject's RAS to MNI transform.