[Mne_analysis] some questions regarding the source modelling of evoked potentials/fields

Irina Anurova anurova.irina at gmail.com
Tue Dec 17 12:43:55 EST 2019
Search archives:

        External Email - Use Caution        

Thank you so much!
It was very helpful.
Best,
Irina.

On Tue, Dec 17, 2019 at 7:21 PM Eric Larson <larson.eric.d at gmail.com> wrote:

>         External Email - Use Caution
>
> If you just want to visualize these, you can use add_foci for the Brain
> object in PySurfer:
>
>
> https://pysurfer.github.io/generated/surfer.Brain.html#surfer.Brain.add_foci
>
> But you'll probably want to plot using the `white` surface, assuming
> that's what you used for source localization, otherwise the location won't
> make much sense.
>
> If you want the vertex number, you can load the fsaverage/surf/lh.white
> and/or rh.white surfaces using `mne.read_surface`, and find the
> index/vertex number of the nearest surface vertex to each of your x/y/z
> points. Once you have this, you can use `add_foci` with
> `coords_as_verts=True` and pass the vertex number -- and this will work
> regardless of which surface you're using to plot.
>
> Eric
>
>
> On Tue, Dec 17, 2019 at 10:12 AM Irina Anurova <anurova.irina at gmail.com>
> wrote:
>
>>         External Email - Use Caution
>>
>> Dear Alexandre,
>> Is there a way to convert MNI coordinates TO the vertex number? I have
>> group mean x, y, z values for different experimental conditions, and I
>> would like to show them on the standard (fsaverage) brain.
>> Thank you very much for your kind help,
>> Irina.
>>
>> On Wed, Nov 6, 2019 at 8:22 PM Irina Anurova <anurova.irina at gmail.com>
>> wrote:
>>
>>> Thank you so much for your help!
>>> Everything works fine.
>>>
>>> On Wed, Nov 6, 2019 at 3:09 PM Alexandre Gramfort <
>>> alexandre.gramfort at inria.fr> wrote:
>>>
>>>>         External Email - Use Caution
>>>>
>>>> hi Irina,
>>>>
>>>> indeed. I thought it was STC objects. You need to apply the morph to
>>>> the stcs
>>>> to get the source estimates on fsaverage (or your average subject).
>>>>
>>>> maybe this can help
>>>> https://mne.tools/stable/auto_examples/inverse/plot_morph_surface_stc.html?highlight=morph
>>>>
>>>> Alex
>>>>
>>>>
>>>> On Wed, Nov 6, 2019 at 12:38 PM Irina Anurova <anurova.irina at gmail.com>
>>>> wrote:
>>>>
>>>>>         External Email - Use Caution
>>>>>
>>>>> I am very sorry for bothering you again,
>>>>> I tried both options, and got the same error message:
>>>>> TypeError: unsupported operand type(s) for +: 'SourceMorph' and
>>>>> 'SourceMorph'
>>>>>
>>>>> Possibly, there was a mistake in morphing procedure.
>>>>>
>>>>> 1. I downloaded individual stcs:
>>>>> stc = mne.read_source_estimate()
>>>>> 2. I computed morphed stcs:
>>>>> morph = mne.compute_source_morph(stc, subject_from=subject_name,
>>>>> subject_to='fsaverage', subjects_dir=subjects_dir)
>>>>> 3. saved them as *.h5:
>>>>> morph.save()
>>>>> 4. Then I download all morphed stcs:
>>>>> morphS1 = mne.read_source_morph(fileFolderSTC_morph +
>>>>> 'S1_stc-morph.h5')
>>>>> morphS2=.........
>>>>> 5. and then tried to average:
>>>>> grand_average = (morphS1 + morphS2 + morphS3 + morphS4) / 4
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Nov 5, 2019 at 10:17 PM Alexandre Gramfort <
>>>>> alexandre.gramfort at inria.fr> wrote:
>>>>>
>>>>>>         External Email - Use Caution
>>>>>>
>>>>>> hi Irina,
>>>>>>
>>>>>> I tried this:
>>>>>>> morph_group = [morphS1, morphS2, morphS3, morphS4]
>>>>>>> grand_average = mne.SourceEstimate.mean(morph_group)
>>>>>>>
>>>>>>> returns error: "AttributeError: 'list' object has no attribute 'sum'"
>>>>>>>
>>>>>>
>>>>>> you can do arithmetic with stcs
>>>>>>
>>>>>> you can do:
>>>>>>
>>>>>> grand_average = (morphS1 + morphS2 + morphS3 + morphS4) / 4
>>>>>>
>>>>>> and this should work
>>>>>>
>>>>>> all_stcs = [morphS1, morphS2, morphS3, morphS4]
>>>>>> grand_average = sum(all_stcs) / len(all_stcs)
>>>>>>
>>>>>> HTH
>>>>>> Alex
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20191217/a2445bd1/attachment-0001.html 


More information about the Mne_analysis mailing list