Interactive Sensor Grouping


Using EMEGS interactive sensor selection.


Why to select sensors


There may be two main reasons to select a restricted set of sensors for further calculations:

Hemispheres behave asymmetrical in some tasks e.g. motor efferences are linked contralaterally, the occipital cortex is organized mirror-invertedly retinotopical and dominance of one temporal lobe is common in the processing of speech or non-speech sounds. Thus, it might be necessary to use laterality of the scalp- potential or magnetic field distribution as a factor of ANOVA.

A given component has a typical scalp distribution, thus affecting some sensors more than others. In some sensors, the proportion of the signal affected by the component is negligible. When calculating some or other kind of ANOVA, they contribute primarily noise, or may be even biased by other components. Excluding them may enhance the Signal/Noise ratio without distorting the pattern of results.

Once you have created a file defining channel groups as described in the following sections, load it by emegs2d Menu > Calculate > Channel groups. Here you will also find some predefined channel sets, chosen by hemisphere or quadrant affiliation. To use a specific set, use > Open Group file and browse to the file. The default folder for Group files is … emegs2.0\emegs2dUtil\ Groups. First, however, use one of the predefined groups to explore this feature. Open up one of your data files along with a group file. Then launch emegs3d. To see how to perform an ANOVA with a limited choice of sensors and sensors grouping as a factor itself, refer to the emegs manual, chapter “statistics”.
Although it is principally possible to choose one sensor group by extracting all other sensors using the ‘Extract All’ or ‘Extract Act.’ list in the emegs2d menu, this procedure is not tested and thus not recommended.



How to select sensors


Sensor Groups are defined and stored in editable text files (extension .txt). These files contain information about the overall number of sensors selected in all groups, the channels included in the single groups and the number of selected channels. By default, they are stored in ..\emegs2.0\emegs2dUtil\Groups.

You may open some ready- made files and see how they are structured: The first value defines the number of total sensors N followed by a 2, which is necessary to indicate that the file is of N x 2 format. These two numbers are followed by number pairs, the first value in the pair indicating the group number, the second indicating the sensor number, respectively. The usage of sensor names like FCz or LP032 is not supported and extraction of sensor in the emegs2d menu does not change the sensor order.

To create a Sensor Group file (SGF) by writing it with a text editor, refer to the ‘emegs2d Data’ viewer to see their particular positions on the scalp (EEG) or in the sensor helmet (MEG), together with the signals picked up by them. For better visualization of signal strengths, restrict the time and amplitude windows, adjusting the ‘Min. Amp.’, ‘Max. Amp.’, ‘Min. Time’ and ‘Max. Time’ in the emegs2d menu.



Visualizing sensors


However, there is a much more convenient way to create a SGF, allowing for a better graphical analysis and faster choice. Open one of your data files such as across-subject averages (e.g. to be created with ‘MergeAvgFiles’ or ‘CalcAvgDiff’, see emegs help) or a plot of p-values or F-values from a sensor-times samplewise-ANOVA (see the statistics chapter in emegs help to gain such a plot). For the remainder, these instructions pertain plotted p-values, other types of continuous signals may require slightly different procedures.

For MEG data only:
When prompted while opening your data file (e.g. an Scads *.at* file), select ‘MEG on sphere’ instead of ‘MEG no sphere’. Alternatively, change in the aftermath: emegs2d Menu > Sensor Format > MEG on sphere. Sensors are now projected onto the scalp surface, yielding a better visualization of the exact sensor/data assignment later on.


Now launch emegs3d from the emegs2d menu or from the ‘Global Power’, the ‘Butterfly’ or the ‘Sensor Selection’ menus. Choose the time point or time interval of interest and make sure that this time interval is not separated into subintervals. Now select ‘Special Tasks > Interactive Sensor Grouping’ of the emegs3d menu.

For MEG data only:
In case you forgot to project the sensors to the scalp, you are prompted to do so now, requiring a fresh start.


Now two windows will pop up: The ‘Interactive sensor grouping’ menu and the interpolated scalp potential topography or spherical projection of the magnetic field topography of this time interval. You will use both to hit your selection and toggle between them.
First, switch to the data window. Use the ‘rotate 3d’ ‘zoom in/out’ and ‘pan’ buttons in the figure toolbar to change the perspective. Sensors are scattered over the sphere, the color map indicates which are receiving strong or minor signals (to adjust the color map, see below).
Now unselect all figure toolbar buttons. Clicking on one sensor will now add it to the currently active sensor group list in the sensor grouping window. Clicking again on a selected sensor will remove it from the list. Selected sensors will be highlighted in different colors for the different sensor groups. A maximum of four sensor groups can be selected interactively.

With ‘Get significant’ in the sensor grouping window you will choose all sensors with signals exceeding a certain (1-p) x 100 value (95~p<0.05) defined in the emegs3d menu. This function is disabled, unless you use a plot of statistical data (which is the case for p- values), use special parameters for visualization (see below) and a time-point plot instead of a time interval. Keep in mind that the multiple pointwise ANOVA for each sensor is no statistical testing, but rather an alternative manner of visualization. You may use this for a comfortable first selection, to be adjusted graphically by hand. Regions may exceed p-values, that are not necessarily related to your component. Better refer to the literature and select channels according to your hypothesis and secondly by the p-Values for fine tuning.

With ‘Mirror group’ > ‘Apply’, emegs will take the sensor set in the source group and select all corresponding contralateral sensors if ‘sagittal’ is checked in the target group. With ‘axial’ an anterior posterior symmetry will be used. Just as with the ‘Get significant’ tool, this serves only for a quick preselection. Scalp or field distributions are never perfectly symmetrical. You are transferring the optimal choice of sensors in one hemisphere to the other hemisphere, where it may be less optimal. Consequently, there will be an artificial enhancement of the effects in one as related to the other, later yielding spurious effects.

Other options in the sensor grouping window are quite self explanatory. When you are done, you may save the SGF with a name of your choice using ‘Write group file’. Again, the default path is … emegs2.0\emegs2dUtil\Groups but feel free to choose a different directory. Additionally, the emegs2d Data window will pop up, showing your sensor groups highlighted. This provides you yet another visualization mode to readjust your sensor selection.


Adjusting visualization


You may change both the way data are evaluated as well as visualized. Default settings are optimal for displaying genuine EEG or MEG data or averages thereof. For using plotted p-values as in the example above, you should choose others.
If you have chosen a time interval of interest and not just a single time point emegs will calculate the mean of the p values from all samples within this interval and this average may readily drop below the limit. So better set a more liberal threshold then and do not hesitate to do so as you are not doing any significance testing here (see above). Due to interpolation - especially in areas which are not covered by sensors - the range of your p- values may exceed +1 or undershoot -1.
By default, the color scale of the sphere ranges from the minimum value in your data within the time intervals of interest to the maximum. There are options to change the contrast of the color scale. You may explore them by changing the ‘Min. / Max.
Amplitude’ values, choosing ‘Auto Amp’ will set them back to the full range of the data. For the p-Values, it is advisory to display only those values exceeding a significance value of your choice. Do so by clicking the ‘Stats’- button and insert some threshold right to it. Areas with p-values below it will remain gray in the map. This setting will also enable the ‘Get significant’ procedure in the sensor grouping window.