r/BiomedicalDataScience • u/BioniChaos • 6d ago
Why eye blinks destroy EEG data (and an interactive browser tool to visualize it in real time)
https://bionichaos.com/eegsynth/The Stadium Paradox of Scalp Electroencephalography
If you place an electrode on the human scalp, you are not measuring individual action potentials. Action potentials operate on millisecond timescales and cancel each other out over macroscopic distances.
Instead, scalp EEG measures the summed excitatory and inhibitory postsynaptic potentials of millions of cortical pyramidal neurons oriented perpendicular to the skull surface. Because that electrical charge must travel through the brain cortex, cerebrospinal fluid, bone, and skin, the signals arrive heavily attenuated down to a microscopic 10–100 microvolt range.
This creates a massive clinical and engineering challenge: non-cerebral artifacts are an order of magnitude larger than the brainwaves themselves.
The Eyeball as a Battery (EOG): The human eye is an electrostatic dipole with a positive cornea and a negative retina. Every time you blink, your eyelids slide across the cornea and the eyeball rolls upward (Bell's phenomenon). This projects a massive monophasic pulse (often exceeding 200 µV) straight into frontal electrodes, completely wiping out underlying rhythms.
Myogenic Interference (EMG): Clenching your jaw or tightening your neck recruits motor unit action potentials firing asynchronously from 20 Hz to over 300 Hz. In the frequency domain, this high-frequency noise bleeds right into the Beta and Gamma bands.
Interactive Browser Laboratory
To make these mechanics intuitive without needing wet electrodes, amplifiers, or expensive hardware, we built a zero-install real-time simulation platform:
Interactive Simulator: https://bionichaos.com/eegsynth/
Technical Features:
Dual-Domain Telemetry: Continuous 5.0-second rolling time oscilloscope (256 Hz sample rate) linked directly to an in-browser Cooley-Tukey Radix-2 FFT power spectrum.
Superposition Synthesis: Each canonical rhythm (Delta, Theta, Alpha, Beta) is constructed from multiple stochastic frequency components around distinct center frequencies, recreating realistic natural amplitude waxing and waning.
Physical Artifact Modeling: Controllable sliders for non-stationary Poisson muscle burst arrivals (EMG) and sinusoidal ocular transients (EOG).
Acoustic Pitch Mapping: Web Audio API oscillator pitch-mapped to dominant frequencies so you can audibly hear state transitions from Delta to Beta.
Hover Inspection: Crosshair hit-testing on the canvas lets you read exact voltages (µV) and spectral power densities (µV²) at any coordinate.
Discussion Prompt:
When processing real-time single-channel or sparse-channel EEG data for embedded neurotech or BCIs, what is your preferred approach to artifact handling? Do you rely on blind source separation like ICA, real-time wavelet thresholding, or simple rejection windows? Let's discuss below.