Set Layout for epoched data

Hello everyone,

I am working with the hcp-meg data, and the plots are 45 degrees off the head model. The one solution on the github site ( hcp.preprocessing.apply_ref_correction()) corrects this issue, but I noticed it messes up the locations in such a way that sensor interpolation is no longer possible. I have found the correct layout (mne.channels.read_layout(‘magnesWH3600’)), the only problem is that I do not know how to apply this to the epoched instance. How do I apply this layout to the data? Unfortunately the dig montage does not fix the issue of the sensors being 45 degrees off, that is why I am trying to work with the layout instead.

Best,
Matt

layouts are 2-D idealized representations of sensor location. They are only for plotting 2-D images of the scalp (looking down from above). Thus you cannot “apply a layout” to your data. You can apply a montage, which contains (real or idealized) 3-D coordinates for each sensor.

pinging @Denis and @mainakjas regarding whether apply_ref_correction() is the right approach within MNE-HCP to fix your issue.

Thanks for the info and pinging those who may be able to help. I realized I copy pasted the wrong function to the chat, this is the function on the git hub: hcp.preprocessing.map_ch_coords_to_mne().
This function corrects the plot, but sacrifices the actual sensor locations, messing up any functions that use sensor neighbors to calculate anything, such as bad sensor interpolation.

I am applying a microstate analysis so having a correct layout in the plot is important. I have seen I can use the layout as an input to one or two of the plotting functions, but not all of them, thus my microstate plots are off. If anyone can help me figure out how to use this correct layout to plot on top of, that would be greatly appreciated. I wonder if there is a simple matplotlib fix for this.