You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you see if you can reproduce using one of the CTF datasets in testing?
If not, can you at least see if this happens without using linear_regression_raw (i.e., using plain Epochs and epochs.average()? My guess is that there is some interaction with picks where linear_regression_raw chooses non-reference channels, and the resulting Evoked instance doesn't have the channels necessary for comps, and this is only noticed on read.
It only depends on picking ref_meg = False. E.g., if I write the raw file's info to the disk after picking, I can't read it due to this error. If I don't pick, it works.
At a minimum, if the error message read "missing compensation channel" instead of saying that a specific weirdly named channel appears more or less than 1 times, it would be a much easier problem :)
And a warning when removing the comp channels about what consequences this will have - that it precludes file saving/reading, and if it worsens the data later on. (If I understand it, the compensation has already been appplied and they can in principle be safely dropped?)
You have to manually turn off compensation right? If yes - seems sensible to me; if you've manually turned off comps and pick the channels, you probably know what you're doing. Otherwise I would prefer a warning.
Activity
larsoner commentedon May 4, 2017
Can you see if you can reproduce using one of the CTF datasets in
testing?If not, can you at least see if this happens without using
linear_regression_raw(i.e., using plainEpochsandepochs.average()? My guess is that there is some interaction withpickswherelinear_regression_rawchooses non-reference channels, and the resultingEvokedinstance doesn't have the channels necessary forcomps, and this is only noticed on read.jona-sassenhagen commentedon May 4, 2017
It only depends on picking
ref_meg = False. E.g., if I write the raw file's info to the disk after picking, I can't read it due to this error. If I don't pick, it works.jaeilepp commentedon May 4, 2017
I'm not sure what's the right fix for this. I see 3 options:
jaeilepp commentedon May 4, 2017
And BTW the issue heading is incorrect. The problem is that the compensation channel is not there.
[-]Reading CTF Evokeds fails: duplicate compensation channel[/-][+]Reading CTF Evokeds fails: missing compensation channel(s)[/+]jona-sassenhagen commentedon May 4, 2017
larsoner commentedon May 4, 2017
Comps are also necessary for fwd/inv.
My proposed fix is that when picking is done (e.g., in
raw.pick_types, or inlinear_regresison_raw, etc.):If compensation has been applied but not all used comp channels are picked, raise an error.
If no compensation has been applied, discard the projectors (alongside a
logger.infothat this is being done).jona-sassenhagen commentedon May 4, 2017
dokato commentedon Dec 13, 2017
Hi, is there a quick workaround before it gets fixed? I got the same error when I try to read my epoched data, so I assume it's related.
jona-sassenhagen commentedon Dec 13, 2017
If you can, it would probably be easiest to recreate the epochs in a what that can be read.
dokato commentedon Dec 13, 2017
Yes, you're right. Thanks.
So in my case skipping
picks=picks_megargument, while creating epochs, helped.agramfort commentedon Dec 13, 2017