NIMH MEG Core Facility

National Institute of Mental Health, Bethesda, Maryland


MEG Analysis

Valid XHTML 1.0!

Valid CSS!

view · edit · attach · print

MEG Analysis Software

Start here:

  • Basics — getting started (this is where the CTF software is)
  • Where is my data? — copying your data to your computer

Tools you always need:

Synthetic Aperture Magnetometry tools:

SAM related stuff:

  • SAM Scripts — basic SAM scripts
  • 3dNormalize — convert SAM volumes to z-scores
  • checkSpheres — multisphere model quality check
  • runCheck — checking for state imbalances
  • readsvl — dump .svl files
  • readcov — dump .cov files
  • readwts — dump .wts files
  • wtsangles — angles between beamformers
  • samslide — create 3d movies of SAM activation
  • SAMerf — event-related SAM
  • SAMcov — A patched SAMcov that allows narrower bands.
  • F-to-Log — A 3dcalc command for converting SAM pseudo-F ratios to log ratios.

Time-frequency tools:

  • ctf2st — runs Stockwell time-frequency analysis in matlab
  • Stockwell — this page has C, Python, and Matlab code for the Stockwell transform
  • StockwellDs — time-frequency analysis in Python

Statistical testing:

  • randpermute — non-parametric random permutation tests
  • 3dpc — An AFNI PCA noise reduction tool for sliding window datasets
  • 3dFDR — An AFNI tool for correcting for multiple comparisons using the false discovery rate (FDR)


  • ctf2matlab — imports data into matlab
  • hilbertDs — compute Hilbert transforms of MEG data
  • ROIbuilder — Create AFNI masks from Talairach Daemon regions
  • calcHeadMotion — Print a summary of the head motion recorded for non-CHL datasets
  • tomhMeglib — C source code for MEG SAM analysis

Toolboxes from other sites:

  • NUTMEG — from UCSF
  • FieldTrip — from the F.C. Donders Centre for Cognitive Neuroimaging
    • fieldtrip-extras.tgz is a set of .m files that allow FieldTrip to work under Octave. Octave 3.0 is quite usable for this. It's not complete but many things work fine with only tiny modifications. I've also got some .oct files for meg_leadfield1.m and a few others, which make the leadfield calculation much faster. There is also stuff in there for general interfacing of Octave and AFNI.
  • EEGLAB — from the Swartz Center for Computational Neuroscience
  • BrainStorm — another Matlab toolbox by Leahy, Mosher, and Baillet
  • AFNI — from NIH
  • Mri3dX — from Aston University, tools to analyze MEG data using SPM
view · edit · attach · print · history · recent changes
Page last modified on February 04, 2017, at 08:34 AM
Department of Health and Human Services image and link First Gov image and link