Epilepsy Project: BESA Data Processing Pipeline
This page documents the data processing pipeline for the Epilepsy project using BESA Research software.
Background on Epilepsy
Epilepsy can be categorized into the following types:
Focal source: a single source of epileptic seizures. These are typically the patients who come to CCAD.
Multi-focal: multiple independent sources of seizures.
Generalised epilepsy: no clear point sources — activity is spread all over the brain. Usually no surgical treatment.
Secondary-generalised: starts from one region then spreads to multiple hemispheres.
Note
Corpus callosum is the fiber bundle connecting the right and left hemispheres. Cutting those fibers (callosotomy) is one surgical approach but is not performed in the UAE.
Inter-ictal Discharges
Inter-ictal discharges occur between seizures (ictal = seizure) and can happen continuously or intermittently:
Spikes: duration of 20–70 ms, sharp and spiky morphology
Sharp waves: duration of 70–200 ms, broader and more wavy morphology
EEG Abnormalities
An EEG recording is considered abnormal if:
There is asymmetry between the right and left hemispheres — for example, alpha amplitude or frequency being significantly different between sides.
There is slowing: focal or generalized slowing in the Delta (0–4 Hz) or Theta (4–8 Hz) bands.
Slowing can be continuous or intermittent.
Delta and theta activity is normal during hyperventilation or sleep, but abnormal when the person is awake.
Important
In our MEG system, we should not see delta and theta activity even if the person is lying down.
Routine EEG
Routine EEGs are typically 30 minutes to 1 hour in duration and include several activation procedures designed to irritate a potential focal source:
Hyperventilation: can trigger epileptic discharges by reducing carbon dioxide to the brain (hypocarbia). The brain slows down during hyperventilation.
Eyes closed / Eyes open: 10 seconds closed then 10 seconds open, performed two to three times. Used to observe background rhythm and alpha waves. This is mandatory to report but is not a biomarker for epilepsy.
Photic stimulation: a stroboscope lamp with controllable flickering frequency, typically starting at 18 Hz.
Note
Non-epileptic seizures: some patients show epileptic-like spikes but do not have epilepsy — this is due to a psychological effect.
If a patient has epilepsy and is on medication, the medication can be reduced while monitoring on a long-term Video EEG to capture seizures and identify the onset.
Detecting the Focal Source
If the field is changing through the rising phase of the spikes, it may rotate within a small neighborhood (firing to neighboring neurons).
True propagation is spread across the brain in a non-cyclic way.
The key measurement window is the first 1/3 of the rising spike.
If there are two hotspots (two locations for a seizure), this could indicate propagation. The first activation in time is the main source.
Imaging and Treatment
An MRI report negative to epilepsy can become positive if it has information from MEG about a potential source.
PET and SPECT are both CT-based imaging modalities used in epilepsy evaluation.
Radio-frequency ablation is one method of burning tissues suspected to be epileptogenic.
In-depth electrodes with many contacts can be placed to precisely localize the source.
Tasks for Participants with Epilepsy
fMRI-EEG: resting state (5 minutes minimum, more if possible)
Somatosensory Evoked Fields (SEF): using an electric stimulator (median nerve, thumb, index, radial nerve)
Stimulator reference: Digitimer DS7A/DS7AH
Developed in collaboration with Professor Veikko Jousmäki (Aalto University, Finland)
Visual Evoked Fields (VEF): checker pattern to map the visual field in the occipital region
Data Processing Pipeline in BESA
Important
Always monitor the EKG (either an electrode signal or an ICA component) while reviewing epilepsy patient data, to ensure that cardiac artifacts are not mistaken for epileptic spikes before starting to label.
Display Settings
30 mm/s screen size per second is the typical reading speed for a neurologist/epileptologist.
Identifying Epileptic Spikes
In EEG, most epileptic spikes are surface-negative:
Bipolar montage (e.g., banana montage): the electrode at the actual source has the most negative peak. The common point at the phase reversal (from negative to positive) is usually the focal point.
Average reference montage: the peak is highest (most negative) on the electrode nearest the focal source, while other electrodes show lower amplitudes with the same negative sign.
Tip
Sleep morphology is seen better in the average montage. When reviewing sleep data for morphological features, prefer the average reference montage for clearer visualization.
Spike Marking and Averaging Workflow
Mark good spikes on both EEG and MEG data.
Once enough spikes are marked, average them using BAT (BESA Averaging Tool), then select C_Average_visually.
View the averaged spikes.
If the averaged waveform is not clear, press F+ to improve visualization.
Pick a time window (typically –250 ms to +250 ms).
MRI segmentation and processing in BESA and create EEG leadfield
Set target points make sure to select BEM and FEM models
During the EEG scan, the nasion, lpa and rpa have already been marked Coregistering the EEG electrodes with the MRI
Select coregistration file
Source Analysis
After averaging, initiate source analysis — it will display the PCA components.
Ensure the baseline is set well before the spike pattern.
Choose the Age Appropriate Template models matching the participant’s age.
Perform PCA on the selection window by selecting the rising part of the spike.
Ensure PCA explains 95% or above; if not, consider propagation.
In multi-focal sources, seizures can trigger randomly from any source.
Apply CLARA to fit a single dipole.
Press Residual to see which part of the data is not explained by the dipole source.
If the residual is large at the spike time, another dipole may be needed to model the remaining data.
References
Bagić, Anto I.; Knowlton, Robert C.; Rose, Douglas F.; Ebersole, John S. for the ACMEGS Clinical Practice Guideline (CPG) Committee. American Clinical Magnetoencephalography Society Clinical Practice Guideline 1: Recording and Analysis of Spontaneous Cerebral Activity. Journal of Clinical Neurophysiology 28(4): p 348–354, August 2011. DOI: 10.1097/WNP.0b013e3182272fed
Contacts
Vahe Poghosyan — MEG specialist in Saudi Arabia