mne.fit_dipole¶

mne.
fit_dipole
(evoked, cov, bem, trans=None, min_dist=5.0, n_jobs=1, pos=None, ori=None, rank=None, verbose=None)[source]¶ Fit a dipole.
 Parameters
 evokedinstance of
Evoked
The dataset to fit.
 cov
str
 instance ofCovariance
The noise covariance.
 bem
str
 instance ofConductorModel
The BEM filename (str) or conductor model.
 trans
str
None
The head<>MRI transform filename. Must be provided unless BEM is a sphere model.
 min_dist
float
Minimum distance (in millimeters) from the dipole to the inner skull. Must be positive. Note that because this is a constraint passed to a solver it is not strict but close, i.e. for a
min_dist=5.
the fits could be 4.9 mm from the inner skull. n_jobs
int
The number of jobs to run in parallel (default 1). Requires the joblib package. It is used in field computation and fitting.
 pos
ndarray
, shape (3,) None
Position of the dipole to use. If None (default), sequential fitting (different position and orientation for each time instance) is performed. If a position (in head coords) is given as an array, the position is fixed during fitting.
New in version 0.12.
 ori
ndarray
, shape (3,) None
Orientation of the dipole to use. If None (default), the orientation is free to change as a function of time. If an orientation (in head coordinates) is given as an array,
pos
must also be provided, and the routine computes the amplitude and goodness of fit of the dipole at the given position and orientation for each time instant.New in version 0.12.
 rank
None
dict
 ‘info’  ‘full’ This controls the rank computation that can be read from the measurement info or estimated from the data. See
Notes
ofmne.compute_rank()
for details.The default is None.New in version 0.20.
 verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more).
 evokedinstance of
 Returns
 dipinstance of
Dipole
orDipoleFixed
The dipole fits. A
mne.DipoleFixed
is returned ifpos
andori
are both not None, otherwise amne.Dipole
is returned. residualinstance of
Evoked
The MEEG data channels with the fitted dipolar activity removed.
 dipinstance of
Notes
New in version 0.9.0.