mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.72k stars 1.32k forks source link

Source covariance Matrix? #8666

Open LiFeng-NJU opened 3 years ago

LiFeng-NJU commented 3 years ago

how can i change the source Covariance matrix in the inverse problem ?theThe minimum-norm current estimates said that The amplitudes of the currents have a Gaussian prior distribution with a known source covariance matrix.I am not very clear about this? The source covariance matrix can be I(Identity matrix) if there are no prior information? Thanks a lot ~~

agramfort commented 3 years ago

did you read https://mne.tools/stable/overview/implementation.html?highlight=dspm#the-minimum-norm-current-estimates ?

larsoner commented 3 years ago

I don't think we currently expose a parameter in make_inverse_operator to allow actually setting the a priori source covariance matrix, i.e., something similar to the MNE-C options:

    --srccov name      Specify the source covariance matrix (defaults to identity matrix)
    --fmri name        Specify the fMRI weighting file (w format)
    --fmrithresh val   Specify the threshold for the fMRI weighting
    --fmrioff    val   Specify the source variance value in locations with no fMRI activation ( 0.10)

In theory we could add a source_cov : None | ndarray, shape (n_vertices * n_orientations,) parameter. The default (None) is equvialent to np.ones(n_vertices * n_orientations), then whatever you give gets weighted according to depth and loose as usual. In principle this shouldn't be too difficult to add.

Is this what you're looking for @LF9076 ?

larsoner commented 3 years ago

(in principle we could add support for full or block-diagonal-3x3 source covariance matrices, too, but at least starting with the diagonal case would be simple enough)

LiFeng-NJU commented 3 years ago

did you read https://mne.tools/stable/overview/implementation.html?highlight=dspm#the-minimum-norm-current-estimates ?

Thanks a lot ,i have read about it clearly~~

LiFeng-NJU commented 3 years ago

我认为我们目前没有公开make_inverse_operator允许实际设置_先验_源协方差矩阵的参数,即类似于MNE-C选项的东西:

  --srccov name      Specify the source covariance matrix (defaults to identity matrix)
  --fmri name        Specify the fMRI weighting file (w format)
  --fmrithresh val   Specify the threshold for the fMRI weighting
  --fmrioff    val   Specify the source variance value in locations with no fMRI activation ( 0.10)

从理论上讲,我们可以添加一个source_cov : None | ndarray, shape (n_vertices * n_orientations,)参数。默认值(None)等价于np.ones(n_vertices * n_orientations),然后您提供的任何内容都会按照depthloose照常进行加权。原则上,添加起来应该不太困难。

这是您在寻找@ LF9076的东西吗? So thanks, in MNE-C there can change the souce_cov due to fMRI information? actually i got some fNIR signals ,so fNIR is same to fMRI signals?