[Mne_analysis] problem with plotting the positions of a selection of magnetometers

Rasha Hyder rasha.hyder12 at gmail.com
Tue Apr 3 16:53:58 EDT 2018
Search archives:

Hi Alexander,

what I mainly want to do is potting the results of permutations on these
selected magnetometers similar to the example here:

https://mne-tools.github.io/dev/auto_tutorials/plot_stats_spatio_temporal_cluster_sensors.html#sphx-glr-auto-tutorials-plot-stats-spatio-temporal-cluster-sensors-py

when I plotted the results I've got the attached figure, which shows the
positions of significant sensors in the right hemisphere despite the fact
that I'm selecting only left magnetometers. After I checked that my
selected channels are correct I thought the problem was in the plotting
part:

*image, _ = plot_topomap(f_map, positions, *
*                                         mask=mask, *
*                                          axes=ax_topo,*
*                                          cmap='Reds', vmin=np.min,
vmax=np.max)*


where:
*pos = mne.channels.find_layout(my_evo.info <http://my_evo.info>, exclude=
excluded_chs)*
*positions= pos.pos*

and when I tried to plot the layout of sensors (*pos.plot()*) I had the
problem.

Hope I made it clear enough,

Thank you and regards
Rasha


On 3 April 2018 at 21:58, Alexandre Gramfort <alexandre.gramfort at inria.fr>
wrote:

> hi Rasha,
>
> just to be sure I understand what you want to do. You want to see the
> channels
> present in a selection like we show in red bad channels in
> evoked.plot_sensors()
> or do you want to plot a topography restricted to a selection?
>
> ALex
>
>
> On Tue, Apr 3, 2018 at 5:45 PM, Rasha Hyder <rasha.hyder12 at gmail.com>
> wrote:
>
>> Dear list,
>> I'm  having problems with plotting the positions of a selection of left
>> magnetometers. In the following I describe what I'm doing in steps to make
>> it easier to follow up with me (my apologies in advance if you find it too
>> long):
>>
>> 1. I selected the: 'Left-temporal', 'Left-parietal' and 'Left-frontal'
>> magnetometers:
>>
>>
>> *evoked = mne.read_evokeds()*
>>
>>
>> *left_chs= mne.read_selection(name= ['Left-temporal', 'Left-parietal',
>>                                     'Left-frontal'], info= evoked.info
>> <http://evoked.info>)my_evo= evoked.pick_types(meg='mag', selection=
>> left_chs)*
>>
>> 2. Then I tried to get the layout of only selected magnetometers using:
>>
>> *pos = mne.channels.find_layout(my_evo.info <http://my_evo.info>)*
>>
>> but this returned the layout of all 102 magnetometers although the
>> documentations says it chooses a layout based on the channels in the
>> info ‘chs’ field!
>>
>> To overcome this issue I had to use this:
>>
>> *pos = mne.channels.find_layout(my_evo.info <http://my_evo.info>,
>> exclude= excluded_chs)*
>>
>> where excluded_chs contains all magnetometers which are not in my
>> selected list *(left_chs)*
>> This worked and I checked the names of channels in *pos.names.*
>>
>> 3. when I tried to plot the positions of the selected sensors using:
>>
>> *pos.plot() * and *mne.viz.plot_layout(pos) *
>>
>> the plots showed the positions of the sensors spanning the whole head
>> scheme (please see attached figure_1).
>>
>> 4. I had the same problem also when plotting the topography of my own
>> defined evoked object *my_evo *(attached as figure_2):
>>
>>
>>
>> *my_evo.plot_topomap()*
>> I would appreciate any suggestion to solve this problem.
>>
>> Best regards
>> Rasha
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20180403/59a55034/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure.png
Type: image/png
Size: 96524 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180403/59a55034/attachment-0001.png 


More information about the Mne_analysis mailing list