Adjust head position to median location after filtering and averaging

Dear all,

I am working on a MEG study with evoked responses. I already cleaned all my data and averaged the evoked responses per subject. I want to do a source estimation so I need my anatomy to be as reliable as possible. Therefore, I wanted to adjust my head position to the median location (via the process Import > Channel File > Adjust coordinate system). However, I am only able to adjust it in the raw data. If I directly try to adjust the head position in the averaged data, I get a really weird adjustment where the head is not in the helmet anymore. Furthermore, I cannot find a way to copy the translation I did in my raw data to my averaged data.

Is there anyone who can help me to adjust the head position in the averaged files, without having to filter/average my data all over again?

@Marc.Lalancette Can you help with this question?

Hello,

First, I recommend making a backup of whatever subject or condition you're going to test this on.

The simple thing to try first would be to simply copy the channel file from the adjusted data and paste it in the averaged folder. I suggest correcting the data from the latest step before averaging so that all the preprocessing info (in particular projectors) are still correct. I think it's supposed to work on imported data too, but of course after averaging you've lost the real head positions across time.

If there's something wrong with the suggestion above, e.g. it won't work on imported data, you could edit the channel file of the averaged data. This is fairly simple, but requires a little Matlab familiarity. First, right click the corrected channel file (can be from raw data), File, Export to Matlab. Give it a name like ChannelCorrected. Do the same with the averaged channel file, name it say ChannelAveraged. Then you can do:

ChannelNew = ChannelCorrected;
ChannelNew.Projector = ChannelAveraged.Projector;
ChannelNew.History = ChannelAveraged.History; % not really needed, but why not.

Finally, right click again on the averaged channel file, File, Import from Matlab, and select the ChannelNew variable.

Hopefully you don't have too many to fix, but if so, it shouldn't be too hard to make a script.