I would like to plot a topomap from obtained psd_welch() values.
However I don’t know how to find the channel and position information, so I tried to do the following using a Layout:
But I couldn’t manage to fit the sensors into the blue circle. I tried changing the sphere, but it only affects to the lines drawing the head. Is there any normalization I should apply to the layout positions so they fit the blue circle properly?
so the position of the sensors that you see in the topomap is correct.
The layout seems not to be in head coordinates. When applying montages the channel positions are transformed to head coordinates. I don’t think you can apply layouts, so you could construct a montage out of this layout and then apply it to the data.
Another, simpler, way would be to center your layout coordinates around zero and then change the sphere radius to something that looks ok. For example:
@agramfort@larsoner
If layouts are supposed to work out of the box when their .pos is passed to mne.viz.plot_topomap then I’d consider the behavior reported by @guiomar to be a bug. WDYT?
I dind’t know how to get the channel positions info from the raw meg data after applying the psd_welch(), so that’s way I tried to go with the layout. How do people usually do this?
Sorry I didn’t want you to change the things, I think with this trick I can manage. Or if you show me a more efficient way to do it, I’d be happy to learn!
I always pass the info to mne.viz.plot_topomap. So if I have epochs object I then do mne.viz.plot_topomap(some_data, epochs.info). I only used this for EEG, but I think it should work for MEG as well. Let us know if the documentation or examples/tutorials should be improved to better expose this approach!
Thanks for pointing to the discussion, @richard, I’ll take a look at it.
@mmagnuski I’m working with resting data which have not been epoched. And the psd_welch() function just returns an array of values, so no more info about the channels.
How should I epoch rest data, with maybe a fixed window length? do you have any example I could look at? Thanks a lot!
Thanks @mmagnuski With the tip you gave me about centering the layout, the issue is solved, So I’ll close the thread Thanks once more for your super fast responses!
Hello @guiomar, I’ve answered to a related question you posted a while back, but I believe this could resolve your issue without having to deal with a layout manually: