1.2.1. Automatic Artifact Marking #
Purpose: Automatic detection of signal segments with amplitude outliers.
How it works:
- The signal is divided into 3-second windows.
- The maximum and minimum are taken for each window.
- Thresholds are calculated as doubled medians of these extrema:
quantPl = 2*median(max), quantMn = 2*median(min) - Values outside the thresholds are clipped to the threshold values, reducing the impact of rare outliers.
- Based on these thresholds, the system automatically marks artifact segments (in the Ignore field).
- Marked segments are shown in yellow on the graph.
Physiological explanation:
The marking procedure is based on the idea of a “typical” amplitude range within 3-second windows: physiologically normal activity usually has a relatively stable amplitude, whereas sharp spikes are more often associated with artifacts. Clipping such spikes reduces their contribution to subsequent calculations while preserving the temporal structure of the signal.
1.2.2. Trim: Removing Marked Segments #
Purpose: Removal of marked (yellow) artifact segments from the signal.
How it works:
- Removal is performed when the Trim checkbox is enabled.
- All segments marked as artifacts in the Ignore field are removed from the signal.
- Time stamps for sections and comments are recalculated to account for the removed segments.
- Signal time is recalculated as:
Time = (1:sum(Ignore==0))/Fs
Use case: Used to exclude motion artifacts, blinks, electromagnetic interference, and other distortions.
Physiological explanation:
Artifacts are signals unrelated to the physiological activity of interest. For example:
- Motion artifacts: When the participant moves their head, the electrodes shift relative to the skin, causing large voltage jumps.
- Blink artifacts: The eyelid muscles generate electrical potentials during blinking, which are recorded by frontal electrodes.
- Electromagnetic interference: Electrical devices (50/60 Hz) create background noise.
- Muscle artifacts: Tension in the neck or facial muscles creates high-frequency oscillations.
Artifact removal is necessary to obtain a “clean” signal that reflects only brain or cardiac activity.
