edneuro/SENSI-EEG-Preproc-ICA-EKG-Trigger
Abstract
This repository contains a MATLAB module for semi-automated detection and removal of EKG (cardiac) and DIN (digital input/trigger) artifacts from EEG data using Independent Component Analysis (ICA). The main entry point is example.m. The module provides automated spectral detection of artifact components followed by interactive review UIs, allowing users to confirm or override automated flags before artifact removal. EKG components are identified via harmonic SNR analysis of the cardiac rhythm band; DIN components are identified via harmonic energy ratios in the trigger-frequency band. Artifact removal is performed by zeroing the flagged ICA components and reconstructing the signal in sensor space.
Publication details
- Journal / source
- Stanford Digital Repository
- Publication date
- 20 April 2026