[Mne_analysis] Fwd: smooth parameter in morph_data: default to change?

Laetitia Grabot laetitia.grabot at gmail.com
Mon Nov 14 05:43:46 EST 2016
Search archives:

So, the stc has indeed, and by mistake, non-zero values only in the
occipital pole. I created it like that:

fsave_vertices = [np.arange(10242),np.arange(10242)]

stc_PSD = mne.SourceEstimate(np.mean(PSD_zs,0), fsave_vertices, 0,
1,subject) # PSD_zs being the zscore PSD computed from stc for each epoch

stc_PSD.times = np.array(freqs) # freqs= [7.5, 15, 22.5]

When stc_PSD is morphed into fsaverage, it gives the a correct
reconstruction with smooth=1 but not with smooth=None, as shown in my
precedent emails.


Btw, the source of my mistake comes from I should have used the vertices of
the original stc to get correct sources (which are less than the usual
20484 because of the forward model):

stc_PSD = mne.SourceEstimate(np.mean(PSD_zs,0), stc.vertices, 0, 1,subject)

with:

In [15]: stc.vertices

Out[15]:

[array([ 59, 83, 127, ..., 145777, 145783, 145795]),

array([ 19, 48, 79, ..., 148294, 148319, 148336])]

When I reconstruct the stc with these vertices, the fsaverage results look
on average more or less than for the native brain (however it is more
parcelled). I'm wondering if the differences are coming from a difference
in the smooth parameter, but the function apply_inverse_epochs does not
specify it.


Thanks!


2016-11-11 21:45 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

> Laetitia, it looks worrisome indeed. I never saw something like this.
> In the worst case we can see together next week at Neurospin. In the
> meantime I'm happy to look at your code, send it to me privately if you
> wish.
>
> Denis
>
> On Fri, Nov 11, 2016 at 9:20 PM Alexandre Gramfort <
> alexandre.gramfort at telecom-paristech.fr> wrote:
>
>> hi Laetitia,
>>
>> this is extremely weird.
>>
>> did you inspect the values inside the stc? maybe plot an histogram?
>>
>> plt.hist(stc.data.ravel())
>>
>> did you reconstruct only in a label?
>>
>> Alex
>>
>>
>> On Thu, Nov 10, 2016 at 3:46 PM, Laetitia Grabot
>> <laetitia.grabot at gmail.com> wrote:
>> >
>> > 2016-11-10 15:29 GMT+01:00 dgw <dgwakeman at gmail.com>:
>> >>
>> >> Hi Laetitia,
>> >>
>> >> I think it would be best to take a step back and see how you got these
>> >> results. I have a number of questions.
>> >>
>> >> 1. How did you produce the individual result? This looks very odd to
>> >> me (it seems to only show activity in very narrow strips, which is
>> >> unusual).
>> >
>> >
>> > The data are PSD (zscore relative to baseline) at the stimulation
>> frequency
>> > of a black and white stimulus and my aim was to create a retinotopic
>> map so,
>> > in that respect, the present map does not seem odd (and I use a small
>> > smoothing parameter in mne_analyze visualization, like 5 i think)
>> >>
>> >>
>> >> 2. Have you checked the FreeSurfer segmentation and labels to
>> >> fsaverage? (The data seem to be rotated somehow).
>> >>
>> >
>> > I'm not sure I get your point, which data seems rotated? The one for
>> > smooth=1 or smooth=None? See attached the same data in the native brain
>> > space, they fit well with the fsaverage data for smooth=1.
>> >
>> >>
>> >> 3. Can you provide an abbreviated version the code you used to produce
>> >> this affect?
>> >
>> >
>> > For the stc smooth=1, I run the line :
>> > stc_fs = mne.morph_data(subject, 'fsaverage', stc, fsave_vertices, 1,
>> > SUBJECTS_DIR, n_jobs=3)
>> >
>> > For the stc smooth=None, I run the line :
>> > stc_fs = mne.morph_data(subject, 'fsaverage', stc, fsave_vertices, None,
>> > SUBJECTS_DIR, n_jobs=3)
>> >
>> >
>> >>
>> >>
>> >> Thanks!
>> >> d
>> >>
>> >> On Thu, Nov 10, 2016 at 9:15 AM, Laetitia Grabot
>> >> <laetitia.grabot at gmail.com> wrote:
>> >> >
>> >> > Dear MNE-users,
>> >> >
>> >> > I would like to draw your attention on the importance of the smooth
>> >> > parameter used to morph a source estimate from an individual's brain
>> to
>> >> > an
>> >> > average brain (fsaverage). By default, this parameter is set to None
>> and
>> >> > the
>> >> > doc precised that, in this case, the smooth parameter is
>> automatically
>> >> > defined to fill the surface with non-zeros value. Yet, it happen to
>> me
>> >> > that
>> >> > the produced source estimates are sometimes unreliable.
>> >> >
>> >> > I attached snapshot where you can see data (here PSD) in the visual
>> >> > cortex
>> >> > (nativeBrain). These data are correctly morphed into fsaverage brain
>> >> > when
>> >> > the smooth parameter is set to 1. However, the source estimate
>> created
>> >> > with
>> >> > smooth=None does not make sense.
>> >> >
>> >> > Maybe it would be better than the default parameter is set to 1 and
>> not
>> >> > to
>> >> > None, or at least that a warning informs which smooth parameter was
>> >> > finally
>> >> > used.
>> >> >
>> >> > Best,
>> >> > Laetitia
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > 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
>> >
>> >
>> > 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
>
>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20161114/7cdf616b/attachment-0001.html 


More information about the Mne_analysis mailing list