[Mne_analysis] Difference between mne_make_movie & python apply_inverse?

Alexandre Gramfort gramfort at nmr.mgh.harvard.edu
Thu Jan 24 07:43:45 EST 2013
Search archives:

hi Andy,

the only obvious difference is the bmin/bmax.

To match the mne_make_movie code you should do:

evoked = Evoked(‘Participant_1_EvokedAuditory.fif’, baseline=(-0.2, None))

do you have MEG only? or EEG + MEG?

HTH
Alex

On Thu, Jan 24, 2013 at 12:34 PM,  <acgt2 at cam.ac.uk> wrote:
>
>
> Hi MNE-ers
>
>
>
> I have just switched from using the mne_make_movie command (version 2.7.3)
> to compute-the-inverse-solution-and-morph-to-average, to using the python
> ‘apply inverse’ operator and the ‘morph_data_precomputed’ to do the same
> thing. I am pleased to find that the results are now similar (as one would
> hope), but noticeably better (my experiments involve auditory data, and
> results that were about a centimeter away from Heschls Gyrus, had now moved
> to exactly on top of Heschls Gyrus). Obviously I’m delighted, but I just
> wanted to check that the python version should be expected to give better
> results – as I had assumed the two results would be the same. Should  they
> be?
>
>
>
> As far as I can work out, both my two pieces of codes applied the same
> parameters. (although smoothing and bmin/max don’t make an appearance in the
> python code, the python log says ‘5 smoothing iterations done’, so I assume
> this is the default)
>
>
>
> The command line version (split onto several lines for easier reading):
>
>
>
> mne_make_movie
>
> --inv /inverse-operators/3L-loose0.2-nodepth-reg-inv.fif
>
> --meas Participant_1_EvokedAuditory.fif
>
> --morph average
>
> --morphgrade
>
> --subject Participant_1
>
> --stc Participant_1_EvokedAuditory.stc
>
> --smooth 5
>
> --snr 1
>
> --bmin -200
>
> --bmax 0
>
> --picknormalcomp
>
>
>
>
>
> Python:
>
>
>
> snr = 1.0
>
> lambda2 = 1.0 / snr ** 2
>
>
>
> # Make inverse solution
>
>
>
> inverse_operator =
> read_inverse_operator(‘/inverse-operators/3L-loose0.2-nodepth-reg-inv.fif’)
>
> evoked = Evoked(‘Participant_1_EvokedAuditory.fif’)
>
> stc_from = apply_inverse(evoked, inverse_operator, lambda2, "MNE",
> pick_normal=True)
>
>
>
> # First compute morph matices for participant
>
> subject_to = 'average'
>
> subject_from = ‘Participant_1’
>
> vertices_to = mne.grade_to_vertices(subject_to, grade=4,
> subjects_dir=subjects_dir)
>
> morph_mat = mne.compute_morph_matrix(subject_from, subject_to,
> stc_from.vertno, vertices_to, subjects_dir=subjects_dir)
>
>
>
> # Morph to average
>
> stc_morphed = mne.morph_data_precomputed(subject_from, subject_to, stc_from,
> vertices_to, morph_mat)
>
> stc_morphed.save(‘Participant_1_EvokedAuditory.stc’)
>
>
>
>
>
> Thanks for any help,
>
>
>
> Andy
>
>
> _______________________________________________
> 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.
>




More information about the Mne_analysis mailing list