mne.make_forward_solution

mne.make_forward_solution(info, trans, src, bem, meg=True, eeg=True, mindist=0.0, ignore_ref=False, n_jobs=1, verbose=None)[source]

Calculate a forward solution for a subject.

Parameters
infomne.Info | str

The mne.Info object with information about the sensors and methods of measurement. If str, then it should be a filepath to a file with measurement information (e.g. mne.io.Raw).

transstr | dict | instance of Transform | None

If str, the path to the head<->MRI transform *-trans.fif file produced during coregistration. Can also be 'fsaverage' to use the built-in fsaverage transformation. If trans is None, an identity matrix is assumed.

Changed in version 0.19: Support for ‘fsaverage’ argument.

srcstr | instance of SourceSpaces

If string, should be a source space filename. Can also be an instance of loaded or generated SourceSpaces.

bemdict | str

Filename of the BEM (e.g., “sample-5120-5120-5120-bem-sol.fif”) to use, or a loaded sphere model (dict).

megbool

If True (Default), include MEG computations.

eegbool

If True (Default), include EEG computations.

mindistfloat

Minimum distance of sources from inner skull surface (in mm).

ignore_refbool

If True, do not include reference channels in compensation. This option should be True for KIT files, since forward computation with reference channels is not currently supported.

n_jobsint

The number of jobs to run in parallel (default 1). If -1, it is set to the number of CPU cores. Requires the joblib package.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns
fwdinstance of Forward

The forward solution.

Notes

The --grad option from MNE-C (to compute gradients) is not implemented here.

To create a fixed-orientation forward solution, use this function followed by mne.convert_forward_solution().

Examples using mne.make_forward_solution