mne.minimum_norm.make_inverse_operator¶
-
mne.minimum_norm.
make_inverse_operator
(info, forward, noise_cov, loose='auto', depth=0.8, fixed='auto', limit_depth_chs=None, rank=None, use_cps=True, verbose=None)[source]¶ Assemble inverse operator.
- Parameters
- info
dict
The measurement info to specify the channels to include. Bad channels in info[‘bads’] are not used.
- forward
dict
Forward operator.
- noise_covinstance of
Covariance
The noise covariance matrix.
- loose
float
in [0, 1] | ‘auto’ Value that weights the source variances of the dipole components that are parallel (tangential) to the cortical surface. If loose is 0 then the solution is computed with fixed orientation, and fixed must be True or “auto”. If loose is 1, it corresponds to free orientations. The default value (‘auto’) is set to 0.2 for surface-oriented source space and set to 1.0 for volumetric, discrete, or mixed source spaces, unless
fixed is True
in which case the value 0. is used.- depth
None
|float
|dict
How to weight (or normalize) the forward using a depth prior. If float (default 0.8), it acts as the depth weighting exponent (
exp
) to use, which must be between 0 and 1. None is equivalent to 0, meaning no depth weighting is performed. It can also be a dict containing keyword arguments to pass tomne.forward.compute_depth_prior()
(see docstring for details and defaults).- fixedbool | ‘auto’
Use fixed source orientations normal to the cortical mantle. If True, the loose parameter must be “auto” or 0. If ‘auto’, the loose value is used.
- limit_depth_chsbool
Deprecated and will be removed in 0.19. Use
depth=dict(limit_depth_chs=...)
.- 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.- use_cps
None
| bool (defaultTrue
) Whether to use cortical patch statistics to define normal orientations. Only used when converting to surface orientation (i.e., for surface source spaces and
loose < 1
).- verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more).
- info
- Returns
- invinstance of
InverseOperator
Inverse operator.
- invinstance of
Notes
For different sets of options (loose, depth, fixed) to work, the forward operator must have been loaded using a certain configuration (i.e., with force_fixed and surf_ori set appropriately). For example, given the desired inverse type (with representative choices of loose = 0.2 and depth = 0.8 shown in the table in various places, as these are the defaults for those parameters):
Inverse desired
Forward parameters allowed
loose
depth
fixed
force_fixed
surf_ori
Loose constraint,Depth weighted0.2
0.8
False
False
True
Loose constraint0.2
None
False
False
True
Free orientation,Depth weighted1.0
0.8
False
False
True
Free orientation1.0
None
False
False
True | False
Fixed constraint,Depth weighted0.0
0.8
True
False
True
Fixed constraint0.0
None
True
True
True
Also note that, if the source space (as stored in the forward solution) has patch statistics computed, these are used to improve the depth weighting. Thus slightly different results are to be expected with and without this information.