# Hypergraph Analysis of Functional Brain Connectivity During Figurative Attention
## 4 Experimental Data Analysis
### Artifact Removal  
The analysis of the raw EEG data started with artifact removal, one of the most critical aspects of data processing. To ensure optimal processing of EEG signals, we identified and eliminated endogenous artifacts (arising from within the subject) and exogenous artifacts (external to the subject), such as interference from nearby electronic equipment, flashing lights, environmental noise, facial muscle movements, and eye blinks. First, we executed the following steps in data preprocessing: (1) After examining the raw signals, we identified time intervals that delineated the beginning and end of the response to applied visual stimulation. (2) We minimized a continuous global current trend using the method described in [63]. This procedure improved the signal quality and facilitated the detection and correction of ocular artifacts during post-processing. (3) We removed endogenous and exogenous noise and focused on the frequencies of our stimuli. For these aims, we applied infinite impulse response (IIR) filters, specifically, 4 th-order zero-phase shift Butterworth filters. Two types of filters were used: (i) band rejection (Notch  
Figure 2: Visual stimulus. In the MLV and MRV tasks, the Necker cube, with its left and right faces modulated at frequencies of 6.67 Hz and 8.57 Hz, is voluntarily perceived as left- or right-oriented, respectively. The right side illustrates the mental images generated by the brain when the subject views the same stimulus. Filter) to attenuate or eliminate the electrical network frequency (50 Hz in Spain) and the refresh rate of the monitor used for visual stimulation (60 Hz), with a bandwidth of 0.1 Hz, and (ii) 4 th-order bandpass filter (BIF) of 4-20 Hz to concentrate on the frequencies of interest. These filters allowed us to filter out or attenuate unwanted frequency components present in the EEG signals. Subsequently, we removed ocular artifacts, which can interfere with the detection and analysis of cortical responses as electrical activity resulting from eye movements; blinking can contaminate brain signals. To ensure that these artifacts did not distort the results or complicate the analysis, we carefully examined the brain signals associated with visual stimuli. Since the eyes behave like a dipole, with the cornea serving as the positive part and the retina as the negative part of the dipole, the identification of ocular artifacts is relatively straightforward. Vertical electro-oculogram artifacts (VEOG) and horizontal electro-oculogram artifacts (HEOG) exhibited electrical potentials ranging from 0.4 to 1.0 mV. To mitigate the impact of ocular artifacts arising from vertical eye movements (VEOG) and lateral eye movements (HEOG) identified by inspection of raw time series, we used the Ocular Correction ICA method in BrainVision Analyzer 2.2.2, using the following algorithms:  
1. Reference to frontal channels: Since our EEG equipment did not include electro-oculography electrodes, we used frontal channels (F7 and F8) as references for the ocular correction ICA. Cumulative quadratic correlation allows the precise removal of relevant components without losing neuronal information. The FP1 channel served as a common VEOG reference to detect vertical artifacts. 2. Infomax Extended ICA algorithm: This algorithm improves the efficiency of artifact correction compared to standard ICA while preserving the neuronal signal of interest. Additionally, a Quality Control process is incorporated to ensure the validity of the obtained results. This approach enables the effective identification and reduction of ocular artifacts in EEG signals, thus facilitating the subsequent analysis of cortical responses associated with the visual stimulus by eliminating or mitigating interference from eye movements and blinks. 3. Value trigger algorithm: This algorithm facilitated the detection of characteristic patterns, such as blinks. Blinks were identified on the basis of their absolute magnitude, with definitive blink movements determined using the correlation method.