Does anyone know how to modify the source space created in
mne_setup_source_space step.
MNE does create txt file version of the source space for visualization
purposes, but I can't seem to find anyway to modify the src.fif file
itself. I want to try applying a prior constraints onto the source space.
Thank you
Typically, constraints are applied either to the forward matrix or inverse
matrix. Can you let us know what type of constraint you are trying to add,
so we might be able to help you better?
Thanks for your reply, I'm trying to reduce the number of active source
using fMRI information. I have a txt file, or w file of the sources to do
calculation on. The idea is just to remove those source points that are
outside of my region of interest, then perform forward and inverse
calculation as normal, using the modified source space.
I know there is an option to constrain source space in
mne_do_inverse_operator, but it seems to give unreasonable results (or at
least very confusing results). As to my understanding, the constraints
applied in mne_do_inverse_operator modify the source covariance matrix,
which is not of interest to me.
On the other hand, is there a way to modify the forward matrix, or inverse
matrix at all? I know we can read them into matlab, but I don't know how to
modify the *.fif file itself.
reducing the source space to the fMRI ROIs is really dangerous as you
will "force" the MEG data to be explained with these ROIs.
Using mne_do_inverse_operator is your only option as far as I know.
Scaling the source covariance is a soft way to restrict the source space.
Given your answers, now I'm wondering if it is possible to write a new .fif
file, say the inverse operator, or forward solution, from Matlab. The
reason I'm asking is because I'm aware that we can export inverse/forward
solution to matlab and view them. But if we were to modify them, customize
them to specific case, is it possible to write that modified mat file into
a .fif file and use that back into the MNE processing pipeline. Can Matlab
do it or does it have to be a Python code?
Currently the matlab toolbox doesn't have functions to write forward or
inverse solutions. Most development has shifted to mne-python, which does
have functions for both of these.
I wouldn't recommend doing these customizations by hand... One tested
option would be to use the MNE command line tools. In particular,
mne_do_inverse_operator takes the following parameters:
--fmri <.w file> : This allows you to specify weights for different
sources in a .w file (or)
--srccov <.fif file> : This allows you to specify an arbitrary source
covariance matrix in the form of a fif file.. Even off-diagonal ones..