[Mne_analysis] stc data and vertices indexing and methods in PySurfers add_data method

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Fri Aug 8 10:08:07 EDT 2014
Search archives:


> I'm trying to visualize source estimates with PySurfers brain.add_data() (to
> not to have to visualize the anatomy all over again).  I have a couple of
> questions of using this method:
> 1) The method needs array (data) and vertices parameters. I'm curious, how
> can you get these from the stc SourceEstimate object? I have used stc.data
> and stc.vertno. Are those good ones to use?


> 2) If I'm trying to use just stc.data and stc.vertno to those parameters
> when visualizing left hemisphere, it gets on index (X) out of range error.
> However: I have made it work with this code:
>             vertices = stc.vertno[0]
>             high_idx = stc.vertno[0].shape[0]
>             array = stc.data[:high_idx, :]
> And for the right hemisphere:
>             vertices = stc.vertno[1]
>             low_idx = stc.vertno[1].shape[0]
>             array = stc.data[low_idx:][:]
> But because the estimate look so scattered I'm left to wonder, if I'm using
> the methods correctly.

you can use stc.lh_data and stc.lh_vertno to get the data and vertno just for
left hemisphere. Same applies for rh.


> Does someone have any ideas to share with me?
> Best regards
> Sebastian
> _______________________________________________
> 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