A machine-readable storage medium containing a program element for
execution by a computing device for performing spike and artifact
detection in EG data. The program element comprises a spike detection
module for processing EG data to detect spikes. Each spike is a candidate
having a likelihood of being related to a physiological event of interest.
The program element further comprises an artifact detection module. The
artifact detection module is operative to compute respective models of
events manifested by the respective spikes detected by the spike detection
module, to use the computed models to determine which spikes among the
spikes detected by the spike detection module have a high likelihood of
being artifacts, to filter the spikes detected by the spike detection
module on the basis of the computed models to produce filtered data and to
output the filtered data.