M/EEG pre-processing 22/04/2014. GUI Script Batch. Clarification of terms SPM speak. What do we need? Why batch?

Similar documents
OHBA M/EEG Analysis Workshop. Mark Woolrich Diego Vidaurre Andrew Quinn Romesh Abeysuriya Robert Becker

Source Reconstruction in MEG & EEG

ERPEEG Tutorial. Version 1.0. This tutorial was written by: Sravya Atluri, Matthew Frehlich and Dr. Faranak Farzan.

The BERGEN Plug-in for EEGLAB

SpikeDet SPM EEG Spike detection toolbox Manual

TMSEEG Tutorial. Version 4.0. This tutorial was written by: Sravya Atluri and Matthew Frehlich. Contact:

- Graphical editing of user montages for convenient data review - Import of user-defined file formats using generic reader

Research Article EEG and MEG Data Analysis in SPM8

PREPROCESSING FOR ADVANCED DATA ANALYSIS

ADJUST: An Automatic EEG artifact Detector based on the Joint Use of Spatial and Temporal features

BESA Research. CE certified software package for comprehensive, fast, and user-friendly analysis of EEG and MEG

A Framework for Evaluating ICA Methods of Artifact Removal from Multichannel EEG

FA ST Manual. The Cyclotron Research Centre methods group

MEG and EEG analysis using

Section 9. Human Anatomy and Physiology

Update ASA 4.8. Expand your research potential with ASA 4.8. Highly advanced 3D display of single channel coherence

ASA Getting Started. ANT BV, Enschede, Netherlands Advanced Neuro Technology

Managing custom montage files Quick montages How custom montage files are applied Markers Adding markers...

Improved rejection of artifacts from EEG data using high-order statistics and independent component analysis

DSI-STREAMER TO EEGLAB EXTENSION

MEG & PLS PIPELINE: SOFTWARE FOR MEG DATA ANALYSIS AND PLS STATISTICS

1. Introduction Installation and requirements... 2

Tutorial of Origin 7.0. Chuang Tan, Zheyun Liu

RS SigEdit A module of RS LabSite Advanced Graphical Display and Editing

BioTrace+ What s new V2013

PSYCHLAB 8 Analysis for recordings in pychophysiology: Software manual.

A short tutorial for RIDE toolbox

Single Subject Demo Data Instructions 1) click "New" and answer "No" to the "spatially preprocess" question.

Standard data format MEG/EEG. ATR Neural Information Analysis Laboratories (June 29, 2012)

User Documentation. BrainWave v User s Documentation -- Toronto, Canada

MEG and EEG analysis using

i-eeg: A Software Tool for EEG Feature Extraction, Feature Selection and Classification

MEG and EEG analysis using

User s Documentation 2.3. BrainWave v User s Documentation -- Toronto, Canada

FMRI Pre-Processing and Model- Based Statistics

Group Sta*s*cs in MEG/EEG

Spatial Filtering Methods in MEG. Part 3: Template Normalization and Group Analysis"

Unsupervised learning in Vision

An Intuitive Explanation of Fourier Theory

FAULT DETECTION AND ISOLATION USING SPECTRAL ANALYSIS. Eugen Iancu

ELECTROOCULOGRAPHY HUMAN COMPUTER INTERFACE ECE-492/3 Senior Design Project Fall 2013

User s Documentation 2.0. BrainWave v User s Documentation -- Toronto, Canada

SENSING A WORLD OF POTENTIAL TM. Dry Sensor Interface DSI 10/20. Simple Ambulatory No-prep Dry EEG System

WIME toolbox for Scilab

Multiple comparisons problem and solutions

1. Introduction Installation and requirements... 3

fmri Preprocessing & Noise Modeling

CS 229: Machine Learning Final Report Identifying Driving Behavior from Data

Small rectangles (and sometimes squares like this

1. Introduction Installation and requirements... 2

Aliki User Manual. Fons Adriaensen

Neuromaster MEE Intra-operative monitoring system

Digital Image Processing. Image Enhancement in the Frequency Domain

MEG/EEG Trial extractor GUI. ATR Neural Information Analysis Laboratories 2012/06/29

biomedical engineering program BIOSIGNAL ANALYSIS GUGER TECHNOLOGIES

AUTOMATIC REMOVAL OF SPARSE ARTIFACTS IN ELECTROENCEPHALOGRAM

FSL Pre-Processing Pipeline

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

Cover Page. The handle holds various files of this Leiden University dissertation.

Perceptron: This is convolution!

Digital EEG System Series

Robust PDF Table Locator

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

Student Quick Reference Guide

Using EEGLAB history for basic scripting

VivoSense. User Manual - LifeShirt Import Module. Vivonoetics, Inc. San Diego, CA, USA Tel. (858) , Fax. (248)

The Artifact Subspace Reconstruction method. Christian A Kothe SCCN / INC / UCSD January 2013

Automated MR Image Analysis Pipelines

WinGLink. Geophysical interpretation software VERSION

Manual. User Reference Guide. Analysis Application (EMG) Electromyography Analysis

Louis Fourrier Fabien Gaie Thomas Rolf

CSE 252B: Computer Vision II

Assignment 3: Edge Detection

Adapting to Non-Stationarity in EEG using a Mixture of Multiple ICA Models

Padaco Instruction Manual

intan intan RHS2000 Application Note: Data File Formats RHS2000 Application Note Data Types TECHNOLOGIES, LLC

CoE4TN4 Image Processing. Chapter 5 Image Restoration and Reconstruction

Multiresolution Motif Discovery in Time Series

Electrical Impedance Tomography: advances in Image Reconstruction

MindWare Electromyography (EMG) Analysis User Reference Guide Version Copyright 2011 by MindWare Technologies LTD. All Rights Reserved.

MEG Laboratory Reference Manual for research use

Non-stationary interpolation in the f-x domain

Outline Introduction Goal Methodology Results Discussion Conclusion 5/9/2008 2

Scope View provides a number of powerful visual tools to enhance analysis and display.

An Accurate Method for Skew Determination in Document Images

Anno accademico 2006/2007. Davide Migliore

HYDROGEOPHYSICS GROUP AARHUS WORKBENCH - CVES MODULE VERSION 1.0

Convolution Product. Change of wave shape as a result of passing through a linear filter

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

Image Filtering, Warping and Sampling

Users Guide: (Hemodynamic Evoked Response)

Sonic Studio Mastering EQ Table of Contents

Image Optimisation. -How to Get the Most out of your Echo Machine. Katarina Winkler, Biomedicinsk analytiker, Barnhjärtcentrum i Lund

Data needs to be prepped for loading into matlab.

FFT-Based Astronomical Image Registration and Stacking using GPU

Structured Light II. Thanks to Ronen Gvili, Szymon Rusinkiewicz and Maks Ovsjanikov

Autonomate Technical Manual

Digital Image Processing Fundamentals

PsPM: Psychophysiological Modelling

Data: a collection of numbers or facts that require further processing before they are meaningful

Transcription:

22/04/2014 Clarification of terms SPM speak GUI Script Batch M/EEG pre-processing Vladimir Litvak Wellcome Trust Centre for Neuroimaging UCL Institute of Neurology Why batch? What do we need? As opposed to GUI - it is easy to reproduce analyses, apply them to different datasets and make modifications. - removing interactive GUI elements from the code makes it cleaner and easier to maintain. As opposed to script complex pipelines can be built without programming expertise saved pipelines can be examined without deciphering other people s code batch provides uniform interface for scripting to different parts of SPM code. Hans Berger 1873-1941 M/EEG signals Events Possible source of artefact Disadvantages of batch there is no step-by-step guiding of the user the need to prepare all the inputs in advance makes some of the operations less intuitive and requires getting used to. Time axis (sampling frequency and onset) Sensor locations Evoked response vs. spontaneous activity <128 electrodes ~300 sensors pre-stim post-stim active awake state resting state falling asleep sleep deep sleep Averaging coma 1 sec 50 uv evoked response ongoing rhythms 1

22/04/2014 Conversion Expert s corner MEG CTF Neuromag BTi-4D Yokogawa EEG Convert button (fileio) spm_eeg_convert EEGLAB Biosemi Brainvision Neuroscan EGI ANT SPM5 Biosig GUI Arbitrary ASCII Matlab script Prepare (Import from workspace) + Reviewing tool SPM dataset *.dat binary data file *.mat header file Fieldtrip raw timelock freq spm_eeg_ft2spm The *.mat file contains a struct, named D, which is converted to an meeg object by spm_eeg_load. The *.dat file is memory-mapped and linked to the object. Special functions called methods provide a simple interface for getting information from the object and updating it and ensure that the header data remain consistent. Sensor locations MEG: Now lets take a step back Requires quite complex sensor representation including locations and orientations of the coils and the way MEG channels are derived from the sensors. Sensor representation is read automatically from the original dataset at conversion. EEG: Requires electrode locations and a montage matrix (optional) to represent different referencing arrangements. Usually electrode locations do not come with the EEG data. SPM assigns default electrode locations for some common systems (extended 10-20, Biosemi, EGI with user s input). Individually measured locations can be loaded; requires co-registration. The recording reference setup can be specified by the user. By default average reference is assumed. 2

22/04/2014 Epoching Filtering Definition: Cutting segments around events. Need to know: What happens (event type, event value) When it happens (time of the events) Need to define: Segment borders Trial type (can be different triggers => single trial type) Shift of time zero of the trial with respect to the trigger (no shift by default). Note: SPM only supports fixed length trials (but there are ways to circumvent this). The epoching function also performs baseline correction (using negative times as the baseline). High-pass remove the DC offset and slow trends in the data. Low-pass remove high-frequency noise. Similar to smoothing. Notch (band-stop) remove artefacts limited in frequency, most commonly line noise and its harmonics. Band-pass focus on the frequency of interest and remove the rest. More suitable for relatively narrow frequency ranges. Filtering - examples EEG re-referencing Unfiltered 5Hz high-pass 10Hz high-pass Average reference 45Hz low-pass 20Hz low-pass 10Hz low-pass EEG re-referencing Artefacts Re-referencing can be used to sensitize sensor level analysis to particular sources (at the expense of other sources). Eye blink EEG For source reconstruction and DCM it is necessary to specify the referencing of the data. This can be done via the Prepare tool. MEG Re-referencing in SPM is done by the Montage function that can apply any linear weighting to the channels and has a wider range of applications. Planar 3

22/04/2014 Artefacts New in SPM12 SPM has an extendable artefact detection function where plug-ins implementing different detection methods ca be applied to subsets of channels. A variety of methods are implemented including, amplitude thresholding, jump detection, flat segment detection, ECG and eye blink detection. It is now possible to mark artefacts in continuous data Marked artefacts are saved as events which are carried over with subsequent processing. So it is possible e.g. to mark artefacts before filtering and keep for later. Marked artefacts can either be used for trial rejection at a later stage ( Reject based on events ) or used in a more sophisticated way with the new @meeg method badsamples In addition, topography-based artefact correction method is available (in MEEGtools toolbox). Channels >> imagesc(d.badsamples(d.indchantype('eeg'), ':', 1)) time (s) Robust averaging Robust averaging Robust averaging is an iterative procedure that computes the mean, down-weights outliers, recomputes the mean etc. until convergence. It relies on the assumption that for any channel and time point most trials are clean. The number of trials should be sufficient to get a distribution (at least a few tens). Kilner, unpublished Wager et al. Neuroimage, 2005 So that s how we got to this point Robust averaging can be used either in combination with or as an alternative to trial rejection. A note about order There is no single correct order of steps, but here are some considerations for order choices It is better to filter continuous data prior to epoching to avoid filter ringing artefacts in every trial. Alternatively the epochs of interest can be padded with more data and then cropped after filtering. It is better to do high-pass filtering or baseline correction before other filtering steps to reduce filter ringing. It is convenient to put downsampling early in the pipeline to make the subsequent steps faster. SPM only filters channels with physiological data. So the channel types should be set correctly before filtering. Some artefacts (e.g. discontinuous jumps or saturations) are more difficult to detect after filtering. 4

22/04/2014 How can we characterize this? Generating time x scalp images? Fourier analysis Fourier analysis Joseph Fourier (1768-1830) Any complex time series can be broken down into a series of superimposed sinusoids with different frequencies Original Different amplitude Different phase Methods of spectral estimation example 1 Morlet 3 cycles Methods of spectral estimation example 2 Hilbert transform Morlet 5 cycles Morlet 7 cycles Morlet 7 cycles Multitaper Morlet w. fixed window Morlet 5 cycles Morlet 9 cycles Optimized multitaper Hilbert transform Multitaper 5

22/04/2014 Robust averaging for TF TF rescaling Raw Log Rel [-7-4]s Diff [-7-4]s LogR [-7-4]s Rel [-0.5 0.5]s Unweighted averaging Robust averaging Changes to TF data handling in SPM12 TF analysis can be done on continuous data. Continuous TF data can be filtered, epoched and used as input to convolution modelling (see below). TF datasets can be montaged (e.g. to create channel ROIs), averaged over frequency (to create datasets in the time domain) and averaged over time (to create spectra). When converting to images the data can be averaged over any possible combination of dimensions to produce images of 1-3D. For instance, when selecting EEG for channels and time for mode in TF case the data will be averaged over channels and frequencies to give 1D waveforms. New Neuromag-specific option Combine planar was added (as in Fieldtrip). Works for both time and TF data. Allows additional processing after combining planar channels (e.g. baseline correction) which was not possible in SPM8. New channel type MEGCOMB is generated Thanks to: The people who contributed material to this presentation (knowingly or not): Stefan Kiebel Jean Daunizeau Gareth Barnes James Kilner Robert Oostenveld Arnaud Delorme Laurence Hunt and all the members of the methods group past and present 6