[Mne_analysis] How to modify source space file "*-src.fif"

Hari Bharadwaj hari at nmr.mgh.harvard.edu
Tue Jun 3 11:07:47 EDT 2014
Search archives:

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..

The former option is adequate in most cases..

HTH,
Hari


On Tue, June 3, 2014 10:48 am, Thinh Nguyen wrote:
> Thank you all for your help
>
> 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?
>
> Best,
> Thinh Nguyen
>
>
> On Sat, May 31, 2014 at 2:13 PM, Alexandre Gramfort <
> alexandre.gramfort at telecom-paristech.fr> wrote:
>
>> hi Thinh,
>>
>> 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.
>>
>> Alex
>>
>>
>> On Fri, May 30, 2014 at 9:55 PM, Thinh Nguyen
>> <thinhnguyen0405 at gmail.com>
>> wrote:
>> > Hi D,
>> >
>> > 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.
>> >
>> > Thanks
>> > Thinh
>> >
>> >
>> > On Fri, May 30, 2014 at 2:44 PM, dgw <dgwakeman at gmail.com> wrote:
>> >>
>> >> Hi Thinh,
>> >>
>> >> 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,
>> >> D
>> >>
>> >>
>> >>
>> >> On Fri, May 30, 2014 at 3:42 PM, Thinh Nguyen <
>> thinhnguyen0405 at gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi MNE users,
>> >>>
>> >>> 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
>> >>>
>> >>> Sincerely,
>> >>> Thinh Nguyen
>> >>>
>> >>> _______________________________________________
>> >>> Mne_analysis mailing list
>> >>> Mne_analysis at nmr.mgh.harvard.edu
>> >>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> >>>
>> >>>
>> >>> The information in this e-mail is intended only for the person to
>> whom
>> it
>> >>> is
>> >>> addressed. If you believe this e-mail was sent to you in error and
>> the
>> >>> e-mail
>> >>> contains patient information, please contact the Partners Compliance
>> >>> HelpLine at
>> >>> http://www.partners.org/complianceline . If the e-mail was sent to
>> you in
>> >>> error
>> >>> but does not contain patient information, please contact the sender
>> and
>> >>> properly
>> >>> dispose of the e-mail.
>> >>>
>> >>
>> >>
>> >> _______________________________________________
>> >> Mne_analysis mailing list
>> >> Mne_analysis at nmr.mgh.harvard.edu
>> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> >>
>> >>
>> >> The information in this e-mail is intended only for the person to
>> whom
>> it
>> >> is
>> >> addressed. If you believe this e-mail was sent to you in error and
>> the
>> >> e-mail
>> >> contains patient information, please contact the Partners Compliance
>> >> HelpLine at
>> >> http://www.partners.org/complianceline . If the e-mail was sent to
>> you
>> in
>> >> error
>> >> but does not contain patient information, please contact the sender
>> and
>> >> properly
>> >> dispose of the e-mail.
>> >>
>> >
>> >
>> > _______________________________________________
>> > Mne_analysis mailing list
>> > Mne_analysis at nmr.mgh.harvard.edu
>> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> >
>> >
>> > The information in this e-mail is intended only for the person to whom
>> it is
>> > addressed. If you believe this e-mail was sent to you in error and the
>> > e-mail
>> > contains patient information, please contact the Partners Compliance
>> > HelpLine at
>> > http://www.partners.org/complianceline . If the e-mail was sent to you
>> in
>> > error
>> > but does not contain patient information, please contact the sender
>> and
>> > properly
>> > dispose of the e-mail.
>> >
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis


-- 
Hari Bharadwaj
PhD Candidate, Biomedical Engineering,
Boston University
677 Beacon St.,
Boston, MA 02215

Martinos Center for Biomedical Imaging,
Massachusetts General Hospital
149 Thirteenth Street,
Charlestown, MA 02129

hari at nmr.mgh.harvard.edu
Ph: 734-883-5954





More information about the Mne_analysis mailing list