[Mne_analysis] Difference between mne_make_movie & python apply_inverse?

Denis-Alexander Engemann d.engemann at fz-juelich.de
Thu Jan 24 16:24:53 EST 2013
Search archives:

Hi,

while we are at it, is there actually one to be preferred way of morphing, i.e. morph_precomputed vs morph_data? Also is there any theoretical pro / con for choosing fsaverage vs inter-subject-morphing?

Best,
Denis


On Thu, Jan 24, 2013 at 9:57 PM, Alexandre Gramfort <gramfort at nmr.mgh.harvard.edu<mailto:gramfort at nmr.mgh.harvard.edu>> wrote:
hi Andy,

my bad you're right "baseline=(-0.2, 0)" should do it. If you high-passed
the data is very possible that baseline correction is not mandatory, even
better without.

Best,
Alex

> I will try adding in the baseline now and report back - although if this is
> the difference it would mean that the result is worse when one adds it in
> (which is possible, but would be a bit strange).
>
> You say I should use 'baseline=(-0.2, None)' to match my make_movie command,
> but I thought that 'baseline=(-0.2, 0)' would be closer,  wouldn't 'None' in
> the second parameter make the baseline from -0.2 to the end of my evoked
> file? (the code says 'end of the interval' but I'm not sure what that refers
> to).
>
> Andy
>
>
>
> -----Original Message-----
> From: Alexandre Gramfort [mailto:gramfort at nmr.mgh.harvard.edu<mailto:gramfort at nmr.mgh.harvard.edu>]
> Sent: 24 January 2013 12:44
> To: acgt2 at cam.ac.uk<mailto:acgt2 at cam.ac.uk>
> Cc: mne_analysis at nmr.mgh.harvard.edu<mailto:mne_analysis at nmr.mgh.harvard.edu>
> Subject: Re: [Mne_analysis] Difference between mne_make_movie & python
> apply_inverse?
>
> 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<mailto: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<mailto: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<mailto: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<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130124/d5a99d96/attachment.html 


More information about the Mne_analysis mailing list