mne-tools/mne-python — pull request #1628 by wmvanvliet (2014-10-29 18:43:54+00:00)
Title: WIP: Function to specify eeg electrodes

With this function, you can specify which EEG electrode serves what purpose in your recording. All my analysis scripts start with a call to this function, so I guess I should share it with others. This function is currently tuned to my specific use cases. I guess others will have their own. Maybe this function therefore doesn't belong in MNE at all. Or maybe it's massively useful to others as well.

EEG electrodes serve many purposes, including:

- Actual EEG measurement electrode
- EOG measurement electrode (when attached close to an eye)
- EEG reference electrode (when attached to mastoids, earlobe, ...)
- Part of a bi-polar measurement
- Not actually attached to anything

Depending of the purpose of an electrode, some preprocessing steps have to be done. For example, the proper EEG reference should be applied, EOG channels should not be referenced to the EEG reference, but instead use a bi-polar referencing scheme, radial EOG (for effective eye blink removal) must be calculated based on a combination of the EOG electrodes and the EEG reference, etc.

And this should all be done by one function. Why? Because it all happens at the same point during your analysis and all these things depend on each other in various ways. The order in which it happens is also important, leaving a usability nightmare if split up into multiple functions that must be called in a specific order (it's not trivial for example for a function to figure out whether the data has already been referenced or not).

Oh, and it should all be done *in-place*. When I process an hour long MEG + EEG recording, I really don't want to make a copy of the Raw data *ever*, as it makes my computer sit in a corner and cry.