EEGLAB Compilation | Section 3 Drawing Channel Power Spectrum and Mapping, and Preprocessing Tools

To start processing the data, we recommend scrolling through the data first, as shown in the figure, then rejecting the obviously "bad" data segments, and then studying their power spectrum to ensure that the loaded data is suitable for further analysis. Please note that the Matlab signal processing toolbox needs to be in the Matlab path to use these functions.
Exploratory step: draw channel power spectrum and map
To draw channel power spectrum and related topographic map, please select "Figure"> "Channel Power Spectrum and Map". This will bring up the pop_spectopo.m window (below). Keep the default settings and press OK.
Insert picture description here
The function should return the spectopo.m graph (below). Since we only sampled 15% of the data (via the Percent data… edit box above), the result of each call should be slightly different. (Naturally, if you enter 100% in the edit box, this will not happen).
Insert picture description hereEach colored trace represents the frequency spectrum of a data channel activity. The leftmost scalp graph shows the power distribution of the scalp at 6 Hz. These data are concentrated on the forehead line. The other scalp diagrams show the power distribution at 10 Hz and 22 Hz.
The pop_spectopo.m window menu (above) allows the user to calculate and plot spectra in a specific time window of the data. The "Percent data …" value can be used to speed up the calculation (by entering a number close to 0) or to return more certainty measures (by entering a number close to 100).
Please note that the functions pop_spectopo.m and spectopo.m can also be used to expand data. Another menu item, "Plot"> "Channel properties", can plot the scalp position of the selected channel and its range of activity And the ERP image diagram of its activities in a single period.
The next section discusses some of the data preprocessing options available through the EEGLAB menu.

1. Preprocessing tool
1.1 Changing the data sampling rate
The most common use of "Tools"> "Change sampling rate" is to reduce the sampling rate to save memory and disk storage space. Pop_resample.m window pops up and asks for the new sampling rate.
This function uses Matlab resample() (in the signal processing toolbox—if you don’t have this toolbox, it will use the slow Matlab function griddata). Since the tutorial EEG data set is already at an acceptable sampling rate, please don’t use it here Use this feature.
1.2 Filtering the data
In order to eliminate linear trends, it is usually necessary to perform high-pass filtering on the data.
Critical Step 6: Elimination of Linear Trends
We recommend filtering continuous EEG data before removing artifacts, although this function can also be used to filter the extracted data (each epoch is filtered separately). Filtering continuous data can minimize filtering artifacts introduced at the epoch boundary. Select "Tools"> "Filter Data"> "Basic FIR Filter (New, Default)", enter 1 (Hz) as the lower limit frequency, and press "OK".
Insert picture description here
A pop\u newset.m window pops up and asks for the name of the new data set. We choose to modify the data set name and overwrite the parent data set by checking the overwrite parent check box, and then pressing the OK button.
Insert picture description herePlease note that if both high-pass and low-pass cutoff frequencies are selected, the filtering procedure may not work. To avoid this problem, we recommend applying a low-pass filter first, and then a high-pass filter in the second call (and vice versa).
Another common use of bandpass filtering is to eliminate 50 Hz or 60 Hz line noise. The filtering option eegfilt.m in EEGLAB uses linear finite impulse response (FIR) filtering. If there is a Matlab signal processing toolbox, use the Matlab routine filtfilt(). This applies the filter forward and then backward to ensure that the phase delay introduced by the filter is eliminated. If there is no Matlab signal processing toolbox, EEGLAB uses a simple filtering method that involves the inverse Fourier transform.
The Infinite Impulse Response (IIR) filter plug-in is also distributed as a plug-in of EEGLAB. After the plug-in is installed (see how to install the plug-in here), you can access it from the menu item Tools>Filter the data>Short IIR Filter. This function uses the same graphical interface as the FIR filter option described above. Although IIR filters usually introduce different phase delays at different frequencies, this can be compensated for by applying the filter in the reverse direction again using the Matlab function filtfilt(). In fact, we recommend that you test the use of this IIR filter because it is stronger (shorter) than the FIR filter.
If you apply filtering and continue to use the updated data set, check whether the filter has been applied by selecting the menu item Plot>Channel spectra and maps to plot the data spectrum. You may notice that the filtered frequency region may show "ripple", which is inevitable, but hopefully acceptable filtering artifacts.
(Note: There is still a lot to learn about filtering, and Matlab itself also provides more filtering options).

1.3 Re-quoting data
①What is re-quoting and why should it be re-quoted?
The reference electrode used when recording EEG data is often referred to as the "universal" reference for the data-if all channels use the same reference. The typical recording reference in EEG recording is a kind of papilla (such as TP10 in the 10-20 system, the red electrode in the figure below), connected papilla (usually a digitally linked papilla, calculated hoc, vertex electrode ( Cz), single or connected earlobes or nose tips, systems with active electrodes (such as BIOSEMI active Two) may record no reference data. In this case, the reference must be selected after the data is imported, otherwise it will be in the data Leave 40 dB of unnecessary noise!
Some researchers claim that the non-scalp reference (earlobe, nose) introduces more noise than the scalp channel reference, although it has not been confirmed to our knowledge. If the data is recorded with a given reference Yes, they can usually be re-referenced (inside or outside of EEGLAB) to any other reference channel or combination of channels.
Insert picture description here
Some researchers advocate converting the data from a fixed or general reference (for example, from a general earlobe or other channel reference) before analysis It is the "average reference", especially when the electrode covers almost the entire head (for some high-density recording systems). The advantage of the average reference lies in the fact that there are positive and negative currents outward across the entire (electrically isolated) sphere The sum will be equal to 0 (according to Ohm's law).
For example, in the figure below, the power in the tangential direction is related to the positive inward current on the left (here blue) and the reverse outward negative current on the right (red) If it is considered that the current through the base of the skull to the neck and body is negligible (for example, due to the low conductivity of the skull at the base of the brain), it can be assumed that the electric field value recorded on all scalp electrodes (dense enough and evenly distributed) The sum is always 0 (average reference hypothesis).
The problem with this hypothesis is that the true average reference data requires an even distribution of electrodes on the head. This is usually not the case, because researchers usually place more electrodes on specific scalp areas , And place fewer electrodes (if any) on the lower part of the head. As a result, the average reference result using one stitch may not be directly compared with the average reference result obtained using another stitch.
Insert picture description hereBelow, we describe in detail the process of converting the data into an "average reference". Please note that in this process, the implicit activity time course at the previous reference electrode can be calculated from the remaining data (therefore, the data obtained An additional channel, although not an additional degree of freedom).
Also note that if the data is recorded using nose tip or earlobe electrodes, these reference electrodes should not be included when calculating the average reference in (1) (below), so in the example, the division factor (in (2) In)) will be 64 instead of 65. Therefore, in the example below, the split factor (2) will be 64 instead of 65. Please note that when using the EEGLAB DIPFIT plug-in to localize source code, "average references" will be used internally (no user input is required).
The choice of data reference does not (literally) change the printed results of the data analysis. For example, the average alpha power map on the scalp must also have a minimum value at the reference channel, even if it is actually below and towards the reference channel. However, no (valid) citation can be said to be wrong. Instead, it can be said that each citation provides another view of the data. However, when evaluating (especially comparing) EEG results, the nature of the reference needs to be considered.
Insert picture description here
For ICA decomposition (described later in this tutorial), the choice of reference is not so important. This is because changing the reference is only equivalent to a linear transformation of the data (in mathematical terms, multiplying it by a fixed re-reference matrix), which is an ICA-insensitive transformation. In fact, we obtained results of similar quality from data recorded and analyzed using the mastoid, vertex, or nose tip reference. We recommend using the same reference as the other channels to record the eye channel (usually four channels, two for vertical eye movement detection and two for horizontal eye movement detection). It is always possible to restore bipolar montage activity by subtracting the activity of the electrode pair. We call these channels "periocular EEG" channels. Because they record not only electrooculogram (EOG) signals, but also prefrontal lobe EEG activity.
ICA can be used to decompose data from an average reference channel, a common reference channel or a bipolar reference channel, and it can also decompose more than one type of data at a time. However, drawing a single scalp map requires that all channels use the same common reference or the same average reference. Since the most easily overlooked in the Robert-Velica model is the anti-missile at the source, these anti-missile values ​​may be ignored in the anti-missile model at the source. ②Specify citations and requote
data.
We will selectively describe electrodes and references in the references.
Exploring steps: To
requote data, select "Tools"> "Requote Data", and convert the data set to an average by calling the pop_reref.m function For reference, when you call this menu item for a given dataset for the first time, the following window will pop up.
Insert picture description here
The above (sample) data was recorded using the mastoid reference. , Since we do not want to include this reference channel in the data or average reference, we do not click the "Add current reference channel in the data" check box. (When the record reference is on the scalp, please click this check box), the data reference to a site box (default) should remain selected.
Now, press the OK button: the following re-reference window appears.
Insert picture description here
Press the OK button to calculate the average reference value, and then this step will be recorded in the main EEGLAB window (not shown). As in the previous step, a dialog box will appear asking for the name of the new data set. Save the re-referenced data to a new data set or click Cancel, because the new reference will not be used in the following sections.
After averaging the reference data, calling the "Tools"> "Re-reference Data" menu still allows the data to be re-referenced to any channel or channel group (or undo the average reference conversion-as long as you choose to include the initial reference channel in the data when converting to the average reference ). Please note that the re-reference function will also re-reference the stored ICA weights and scalp maps (if they exist).
Requoting data can be more complicated. For example, if you record data that is referenced to Cz, and want to re-reference the data to the linked mastoid. Now, you want to add Cz back to the data under the average reference hypothesis (the hypothesis that the average of all electrodes is 0). The first step is to calculate the average reference and declare Cz as a reference in the channel editor. In the channel editor, the references are placed after all data channels (please note that the check box "data channels" is not checked because they are not actual data channels). To declare a reference, go to the last channel and press the "Add" button to create an empty channel.
Insert picture description here
Fill in the channel label (enter "Cz" in the "Channel label" edit box), and then enter the location of the channel (if any). For example, you can enter X, Y, Z position, and then press XYZ->Polar&Sph. Convert 3D rectangular coordinates to polar coordinates and spherical coordinates. If you don't have the electrode position, you just need to press the "Find position" button to find it automatically based on the 10-20 channel label (note that this will find the position of all electrodes).
Insert picture description hereThen press the Set reference button to set the reference of all channels to Cz (you need to type Cz in the check box, and you need to manually enter the channel range).
Insert picture description here
Press OK to confirm your new reference channel, and then return to the re-reference interface. Now, click the Keep Old Reference button.
Insert picture description here
You can now select the electrode "Cz" and press OK.
Insert picture description here
Then press OK to re-quote the data, this is the first step. If you really want to re-reference the data to the linked papillae, you need to call the re-reference interface again and select two papillae as new references. The reason for this overly complicated process is that the reference channel can have a position, and the position needs to be declared in the channel editor so that it can be drawn together with other channels. The next tutorial section will discuss how to extract data segments from continuous or segmented data sets.

③Re-citing multiple channels.
Assuming that you collected data using reference M1 (massoid) and want to use the linked mastoids (M1 and M2) as a reference to process the data, the process is as follows: As described in the previous section, specify M1 as Reference and calculate the average reference while maintaining the electrode M1 (how to retain the reference channel is also described in the previous section) and re-quote the data while selecting the electrodes M1 and M2 as the reference (then you can choose to retain the reference channel or delete them)

Insert a small ad

BCI Pro scientific research grade EEG amplifier
Total number of EEG signal channels 8/16/24/32 channels
Sampling frequency 250-1000SPS configurable
Signal amplification factor 12-24 times configurable
Signal input impedance ≥1TΩ
Input signal common mode rejection ratio ≥-110dB
Signal sampling accuracy 24bit
input reference noise 1.4uVpp (bandwidth 70Hz)
input bias current ≤ 2pA
input offset voltage ≤ 100uV
input electrode lead impedance detection, connection can be flexibly configured
electrode input ESD protection performance in line with IEC 61000-4-2 contact discharge ± 12kV
IEC 61000-4-2 air gap discharge ±15kV
IEC 61000-4-5 surge 3.0A (8/20μs)
system life 8h, charging time 3h, system battery power monitoring
Volume 130 90 100mm, weight 400g
Insert picture description here
Insert picture description here
Add management to get more many

Insert picture description here
This article is organized or written by the BCIduino brain-computer interface open source community. The BCIduino brain-computer interface community was initiated and established by masters and doctors from Beihang University, Cornell University, Peking University, Capital Medical University, etc. Welcome to join the community by scanning the code and remark "BCI", and also welcome to purchase BCIduino EEG module (some Search for treasure)

Guess you like

Origin blog.csdn.net/nvsirgn/article/details/112391331