MCPcopy
hub / github.com/mne-tools/mne-python / compute_depth_prior

Function compute_depth_prior

mne/forward/forward.py:1296–1476  ·  view source on GitHub ↗

Compute depth prior for depth weighting. Parameters ---------- forward : instance of Forward The forward solution. %(info_not_none)s exp : float Exponent for the depth weighting, must be between 0 and 1. limit : float | None The upper bound on depth w

(
    forward,
    info,
    exp=0.8,
    limit=10.0,
    limit_depth_chs=False,
    combine_xyz="spectral",
    noise_cov=None,
    rank=None,
    verbose=None,
)

Source from the content-addressed store, hash-verified

1294
1295@verbose
1296def compute_depth_prior(
1297 forward,
1298 info,
1299 exp=0.8,
1300 limit=10.0,
1301 limit_depth_chs=False,
1302 combine_xyz="spectral",
1303 noise_cov=None,
1304 rank=None,
1305 verbose=None,
1306):
1307 """Compute depth prior for depth weighting.
1308
1309 Parameters
1310 ----------
1311 forward : instance of Forward
1312 The forward solution.
1313 %(info_not_none)s
1314 exp : float
1315 Exponent for the depth weighting, must be between 0 and 1.
1316 limit : float | None
1317 The upper bound on depth weighting.
1318 Can be None to be bounded by the largest finite prior.
1319 limit_depth_chs : bool | 'whiten'
1320 How to deal with multiple channel types in depth weighting.
1321 The default is True, which whitens based on the source sensitivity
1322 of the highest-SNR channel type. See Notes for details.
1323
1324 .. versionchanged:: 0.18
1325 Added the "whiten" option.
1326 combine_xyz : 'spectral' | 'fro'
1327 When a loose (or free) orientation is used, how the depth weighting
1328 for each triplet should be calculated.
1329 If 'spectral', use the squared spectral norm of Gk.
1330 If 'fro', use the squared Frobenius norm of Gk.
1331
1332 .. versionadded:: 0.18
1333 noise_cov : instance of Covariance | None
1334 The noise covariance to use to whiten the gain matrix when
1335 ``limit_depth_chs='whiten'``.
1336
1337 .. versionadded:: 0.18
1338 %(rank_none)s
1339
1340 .. versionadded:: 0.18
1341 %(verbose)s
1342
1343 Returns
1344 -------
1345 depth_prior : ndarray, shape (n_vertices,)
1346 The depth prior.
1347
1348 See Also
1349 --------
1350 compute_orient_prior
1351
1352 Notes
1353 -----

Callers 2

test_priorsFunction · 0.90
_prepare_forwardFunction · 0.85

Calls 11

_validate_typeFunction · 0.85
is_fixed_orientFunction · 0.85
_check_optionFunction · 0.85
_restrict_gain_matrixFunction · 0.85
compute_whitenerFunction · 0.85
_reshape_viewFunction · 0.85
infoMethod · 0.80
normMethod · 0.80
sqrtMethod · 0.80
minimumMethod · 0.80
sumMethod · 0.45

Tested by 1

test_priorsFunction · 0.72