[Mne_analysis] Spatiotemporal cluster test in a subset of vertices

Denis A. Engemann denis.engemann at gmail.com
Mon Aug 18 10:46:27 EDT 2014
Search archives:

make sure to get all mappings right which are involved

1) hemisphere vertices to whole brain indices (e.g. for ico5 / fsaverage the left hemisphere indices go up to 10241 and the right ones up to 20483, nevertheless vertices don't go beyond 10242.

2) all label vertices and the vertices used by the source space

use label.get_vertices_used to be sure

Importantly, the clustering test expects indices related to the data passed.

-Denis

> On 18 Aug 2014, at 13:52, Tal Linzen <tal.linzen at gmail.com> wrote:
> 
> Thanks for your replies. Is this the right way to use spatial_exclude? I think I might be missing something, because the clusters are kind of in the ROI I would want them to be in but also spill out of the ROI:
> 
>         vertices = np.arange(5124)
>         excluded_vertices = vertices[~np.in1d(vertices, label.vertices)]
>         tris = mne.source_estimate.grade_to_tris(4)
>         connectivity = mne.source_estimate.spatial_tris_connectivity(tris)
>         clu = mne.stats.spatio_temporal_cluster_1samp_test(
>             data, connectivity=connectivity, n_jobs=2,
>             n_permutations=n_permutations, threshold=t_threshold,
>             spatial_exclude=excluded_vertices)
> 
> Does anything jump out at you? Otherwise I can put my data somewhere online and we can take a look together.
> 
> Thanks!
> 
> Tal
> 
> 
>> On Tue, Aug 12, 2014 at 7:55 AM, Denis-Alexander Engemann <denis.engemann at gmail.com> wrote:
>> Hi Tal,
>> 
>> also have a look at this example (in combination wtih #1503):
>> 
>> https://gist.github.com/dengemann/ea482183be869568412c
>> 
>> Denis
>> 
>> 
>>> On Tue, Aug 12, 2014 at 1:16 AM, Eric Larson <larson.eric.d at gmail.com> wrote:
>>> For now, you can use the `spatial_exclude` parameter of the clustering functions to exclude all the source space vertices outside your label:
>>> 
>>> http://martinos.org/mne/stable/generated/mne.stats.spatio_temporal_cluster_1samp_test.html#mne.stats.spatio_temporal_cluster_1samp_test
>>> 
>>> Denis also has some work going to make it easier:
>>> 
>>> https://github.com/mne-tools/mne-python/pull/1503
>>> 
>>> Eric
>>> 
>>> 
>>> 
>>>> On Mon, Aug 11, 2014 at 4:05 PM, Tal Linzen <tal.linzen at gmail.com> wrote:
>>>> Hi all,
>>>> 
>>>> How do I restrict the spatiotemporal cluster test to a label? I've been trying to work off of this example:
>>>> 
>>>> http://martinos.org/mne/stable/auto_examples/stats/plot_cluster_stats_spatio_temporal.html
>>>> 
>>>> And zeroed in on the following line as the line I'd probably want to modify:
>>>> 
>>>> connectivity = spatial_tris_connectivity(grade_to_tris(5))
>>>> 
>>>> But this is pretty opaque to me and I'm not sure what the next step would be.
>>>> 
>>>> Thanks,
>>>> Tal
>>>> 
>>>> _______________________________________________
>>>> 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
> 
> 
> 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/20140818/212c3857/attachment.html 


More information about the Mne_analysis mailing list