SAMhfo Version 3

SAMhfo is new MEG epilepsy analysis for imaging regions of intermittant high-frequency oscillations (HFOs). These oscillations may be diagnostic for the ictal onset zone. Not all MEG epilepsy recordings have significant HFO content. Of those that do, SAMhfo can help resolve ambiguity of the true ictal onset zone when SAMepi show multiple interictal spike locations.

The SAMhfo algorthm overcomes the difficult in identifying sources of intermittant high-frequency power. For analysis of dataset of several minutes duration, bursts of high-frequency oscillations may contribute very little to the total power. This means that simple imaging the 3D distribution of power (e.g., using SAMpower) may not have sufficient contrast to discriminate the location of the HFO bursts. SAMhfo takes advantage of the intermittant nature of HFO bursts by showing the excess kurtosis of the Hilbert envelope of each voxel source waveform. At locations where there is only projected sensor noise, the Hilbert envelope will have constant amplitude, resulting in an excess kurtosis close to zero. Locations where HFO bursts occur will have a high excess kurtosis.

The algorithm for SAMhfo is as follows. The MEG dataset is read into memory and bandpass filtered as specified by ImageBand. The SAM beamformer coeffients generated by SAMwts are applied to the filtered data, giving source estimate time series for each voxel. The Hilbert envelope of the source time series is then smoothed by the lowpass filter designated by SmoothBand. SAMhfo then computes the excess kurtosis (g2)of the smoothed Hilbert envelope, using:

If g2 is less than zero, that voxel is set to zero. Only positive g2 values appear in the NIFTI image file. This allows SAMhfo to identify locations of intermittant burst of HFO activity.

Usage

SAMhfo -r < dataset_name > -m < parameter_file_name > -v

The -r flag is followed by the dataset name (with or without the .ds suffix). The -m flag is followed by the parameter file name without the .param suffix. The -v argument specifies verbose output - else SAMhfo works silently.

For VSM/CTF MEG users, SAMhfo looks for "bad.segments" and "Bad.Channels" within the dataset directory. These files can be created and edited using the DataEditor program. Bad time segments can be marked where there are artifacts such as from jaw muscles, swallowing, or head movement. Additionally, bad channels can be deleted from the analyses.

Here is an example parameter file for HFO imaging:

NumMarkers 0
CovBand 50.0 150.0
ImageBand 100.0 150.0
OrientBand 14.0 30.0
SmoothBand 0.0 50.0
XBounds -10.0 10.0
YBounds -9.0 9.0
ZBounds -2.0 15.0
ImageStep 0.5
ImageMetric Kurtosis
Model Nolte
CovType GLOBAL

These are user selectable parameters representing a good starting point for imaging HFOs. The 100-150 Hz ImageBand bandpass is merely an example and should be set to represent the frequency range where HFOs are either observed or are suspected. The 50-150 Hz CovBand bandpass includes frequencies outside the limits of ImageBand so that artifacts from (e.g.) vagus nerve stimulators can be included in the SAM beamformer coefficient computation.

It may be necessary to acquire MEG epilepsy data in a wider bandwidth for finding HFOs above the frequency range in the above example.

A shell script for analyzing an epilepsy dataset using the above parameter file, named "hfo.param" is:

SAMcov -r XYZABC_epilepsy -m hfo -v
SAMwts -r XYZABC_epilepsy -m hfo -v
SAMhfo -r XYZABC_epilepsy -m hfo -v