ELEKTA
MaxFilter Users Guide sw ver 2.2 Oct 2010
Users Guide
88 Pages
Preview
Page 1
Not for USA
TM
MaxFilter User’s Guide Software version 2.2 October 2010
Copyright © 2010 Elekta Oy, Helsinki, Finland. Elekta assumes no liability for use of this document if any unauthorized changes to the content or format have been made. Every care has been taken to ensure the accuracy of the information in this document. However, Elekta assumes no responsibility or liability for errors, inaccuracies, or omissions that may appear in this document. Elekta reserves the right to change the product without further notice to improve reliability, function or design. This document is provided without warranty of any kind, either implied or expressed, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Elekta Neuromag, MaxFilter and MaxShield are trademarks of Elekta. This product is protected by the following issued or pending patents: US2006031038 (Signal Space Separation), US6876196 (Head position determination), WO2005067789 (DC fields), WO2005078467 (MaxShield), WO2006114473 (temporal Signal Space Separation).
Printing History
Neuromag p/n
Software
Date
1st edition
NM24057A
2.2
2010-10-04
NM24057A
Contents Chapter 1 Introduction
5
1.1 Overview... 5 1.2 Maxwell filtering... 5 1.3 Software functionality... 7 1.4 Software safety... 8
Chapter 2 Using MaxFilter
11
2.1 Background... 11 2.2 Launching the program... 12 Graphical User Interface... 12 Command line... 12 2.3 GUI main window... 13 2.4 Menus... 14 File... 14 Parameters... 14 Display... 15 Averager... 15 Help... 15 2.5 Loading data... 16 Setting Maxwell filtering job... 17 Ignoring warnings... 18 2.6 Time scale of raw data... 18 2.7 Output options... 19 Filename... 20 Data packing... 20 Data skipping... 21 Processing history... 21 Degrees of freedom... 22 2.8 Logging the output... 22 2.9 Command-line arguments... 23
Chapter 3 MaxFilter parameters
25
3.1 Coordinate systems... 25 3.2 Expansion origin... 26 Default setting... 26 Changing the origin and frame... 26 Fit to isotrak or anatomy... 27 3.3 Harmonic basis functions... 28 Order selection... 28
i
Optimization of the SSS bases... 28 3.4 Bad channels settings... 30 Autobad... 30 Evoked data... 31 Raw data... 31 Sensor artifacts... 32 3.5 Temporal SSS settings... 33 3.6 Low-pass filtering and downsampling... 35 3.7 MEG sensors... 36 Sensor types... 36 Calibration adjustment and cross-talk correction... 36 Changing the fine-calibration and cross-talk correction... 37 3.8 Parallel processing... 39 3.9 Command-line options... 40 3.10 Default parameters... 41 Default values... 41 Customizing default settings... 41
Chapter 4 MaxMove
43
4.1 Data transformation... 43 4.2 Initial head position... 44 4.3 Continuous head position tracking... 44 HPI parameters... 45 Intermittent HPI... 46 4.4 Head position estimation... 47 4.5 Viewing the head positions... 48 Exporting graphics... 50 Transformation to mean head position... 51 4.6 Movement correction... 51 4.7 Command-line options... 52
Chapter 5 MaxAve
53
5.1 Off-line averaging... 53 5.2 Launching the program... 53 5.3 Selecting files... 55 5.4 Averaging parameters... 55 5.5 Artefact rejection... 56
Chapter 6 Performance and limitations
59
6.1 Clinical validation study... 59 6.2 Limitations of MaxFilter... 60 Saturated MEG channels... 60 Bad coordinate transformation... 60 Transformation distance... 61 Physiological background activation... 62 Limitations of tSSS... 62 6.3 Guidelines for head movement correction... 63 ii
Appendix A Maxwell filtering in a nutshell
65
A.1 Signal space separation... 65 A.2 Harmonic amplitudes... 66 A.3 Pseudoinverse... 67 A.4 Optimization of virtual channel selection... 67 A.5 Channel position weighting... 68
Appendix B Elekta Neuromag MEG sensors
69
B.1 Sensor types... 69 B.2 Scaling between magnetometers and gradiometers... 70 B.3 Manipulation of sensor types... 71 B.4 Reconstruction of sensor signals... 71
Appendix C Temporal subspace projection
73
Appendix D Head position estimation
75
D.1 HPI signals... 75 D.2 Coordinate matching... 77 D.3 HPI channels... 78 D.4 Head position file format... 78
Appendix E Command-line arguments
79
Appendix F Revision history
85
iii
1 CHAPTER 1
Introduction
1.1 Overview This User’s Guide gives detailed explanation of the Elekta Neuromag MaxFilter software for MEG data analysis. MaxFilter is intended to be used with Elekta Neuromag MEG products in suppressing magnetic interference coming from inside and outside of the sensor array, in reducing measurement artifacts, in transforming data between different head positions, and in compensating disturbances due to magnetized material on the head and due to head movements. This Chapter presents a general overview and main functionalities of the software. Chapters 2-5 describe how to use the program and to control the functionality and parameters. Chapter 6 discusses the performance and limitations of MaxFilter. Mathematical background and some further information are included in the Appendices.
1.2 Maxwell filtering Signal Space Separation (SSS) is a method that utilizes the fundamental properties of electromagnetic fields and harmonic function expansions in separating the measured MEG data into three components (Figure 1.1): b in : b out : n:
The brain signals originating inside of the sensor array (space S in ). External disturbances arising outside of the sensor array (space S out ). Noise and artifacts generated by the sensors and sources of interference located very close to the sensors (space S T ).
The disturbing magnetic interference is suppressed by omitting the harmonic function components corresponding to unduly high spatial frequencies, by neglecting the S out -space component b out , and by reducing the S T -space component n . Since the method is based directly on Maxwell’s equations, the operation can be called Maxwell filtering; hence the name MaxFilter.
NM24057A
5
1
Introduction
Sout
n ST
Sin
Figure 1.1 The geometry in Maxwell filtering. One hypothetical spherical shell inside of the sensor array encloses the subject’s brain, and another one encloses all MEG sensors. The radii of the shells are determined, respectively, as the smallest and largest distances from the origin to the sensor locations. The basic Maxwell filtering operation can be regarded as spatial filtering, because separation of b in and b out is done on the basis of the spatial patterns and is independent of time. Spatial separation can suppress only external interference emanating from space S out , such as electromagnetic pollution due to power lines, radio communication, traffic, elevators etc. External interference can also arise in the patient. For instance, normal cardiac and muscular activation cause fields detectable by MEG sensors, and any pieces of magnetized material in/on the body may cause very large disturbances. Identification and suppression of the S T -space components require additional knowledge of the temporal dynamics. The temporal extension of the SSS method (tSSS1) significantly widens the software shielding capability of MaxFilter, because tSSS can suppress also internal interference that arises in the S T -space or very close to it. Such disturbances can be caused, for example, by magnetized pieces in/on the subject's head (such as dental work, braces, or magnetized left-overs in burr-holes), or by pacemakers or stimulators attached to the patient. Maxwell filtering inherently transforms measured MEG signals into virtual channels in terms of harmonic function amplitudes. Because the virtual channels are independent of the device, they offer a straightforward method for estimating corresponding MEG signals in other sensor arrays. This function called MaxMove provides an elegant way to transfer MEG signals between different head positions and to compensate for disturbances caused by head movements during recordings. 1. In version 2.1, tSSS had a synonym MaxST.
6
NM24057A
Introduction
1
MaxFilter is easy to apply and the default settings provide good results in most cases. Maxwell filtering as implemented in this program is an irreversible operation. The expansion corresponding to the space outside of the sensor array ( b out ) is discarded before saving the result. In addition, tSSS projects out identified sensor-space artifact waveforms. Note: The original recording cannot be reconstructed from the result FIFF file. Therefore, it is very important to keep also the original data files on suitable backup media after applying MaxFilter. The mathematical basis of Maxwell filtering is described briefly in Appendix A. The Signal Space Separation algorithms and their applications are discussed in detail in: 1. S. Taulu, M. Kajola, and J. Simola. Suppression of interference and artifacts by the signal space separation method. Brain Topography 16(4), 269-275, 2004. 2. S. Taulu, and M. Kajola. Presentation of electromagnetic multichannel data: the signal space separation method. Journal of Applied Physics, 97(12), 124905, June 2005. 3. S. Taulu, J. Simola, and M. Kajola. Applications of the signal space separation method. IEEE Transactions on Signal Processing, 53(9), 3359-3372, 2005. 4. S. Taulu, and J. Simola. Spatiotemporal signal space separation method for rejecting nearby interference in MEG measurements. Physics in Medicine and Biology, 51, 1759-1768, 2006.
1.3 Software functionality MaxFilter 2.2 software provides three separate programs: MaxFilter The main command-line application for Maxwell filtering. This program includes also the tSSS and MaxMove functions. MaxAve Off-line version of the on-line averager, provided for convenient re-averaging of raw data before or after Maxwell filtering. MaxFilter_GUI Graphical user interface program which collects the input arguments, and then starts MaxFilter or MaxAve as a subprocess. Information of the data processing is displayed on the main display and in a log window.
NM24057A
7
1
Introduction
The main functions of MaxFilter are: Software shielding By subtracting the component b out from measured signals b , the program performs software shielding on the measured MEG data (i.e. interference suppression). Automated detection of bad channels By comparing the reconstructed sum b in + b out with measured signals b , the program can automatically detect if there are MEG channels with bad data that need to be excluded from Maxwell filtering. Spatio-temporal suppression of S T -space artifacts By subtracting the reconstructed waveforms b in ( t ) + b out ( t ) from measured signals b ( t ) , the program can identify and suppress artifact waveforms which arise in the S T -space. Transformation of MEG data between different head positions By transforming the component b in into harmonic amplitudes (i.e. virtual channels), MEG signals in a different head position can be estimated easily. Correction of disturbances caused by temporary head movements By extracting head position indicator (HPI) signals applied continuously during a measurement, the data transformation capability is utilized to estimate the corresponding MEG signals in a static reference head position.
1.4 Software safety This manual contains important hazard information which must be read, understood and observed by all users. General limitations of the program are included in the following Chapters. For your convenience all warnings that appear in the manual are presented below.
8
!
Warning: It is important that the user inspects both the input and the output data visually to judge the quality of the MaxFilter result.
!
Warning: If the fine-calibration and cross-talk correction data are not available, the performance of MaxFilter may not be as good as with the fine-calibrated system.
!
Warning: Special care should be taken to ensure that right fine-calibration data are used for imported or old data for which the default calibration does not apply. NM24057A
Introduction
! ! ! !
1
Warning: If the threshold of the automated bad channel detection is too small, the program may classify good channels as bads, and if it is too high, some bad channels may remain undetected. Warning: If tSSS is applied on averaged data or if there were several saturated channels in raw data, the result must be inspected very carefully. Warning: The user must judge the result carefully if the tSSS correlation limit is lowered from the default value. Warning: MaxMove operations require that the initial and reference coordinate transformations are defined correctly.
!
Warning: Head position calculation errors affect the data quality after movement compensation. The user must inspect the head position fitting error and goodness before data analysis.
!
Warning: If internal active shielding was applied in the input file, the user must not perform data analysis on MaxFilter output files obtained with the maintenance options -nosss or -ctc only. Warning: Spatiotemporal signal space separation (tSSS) may diminish brain signals arising from very strong, superficial sources.
!
NM24057A
!
Warning: Head movements generate physiological background signals due to muscle and motor cortex activation. These disturbances are not suppressed by MaxFilter and may deteriorate the source localization accuracy.
!
Warning: MaxFilter cannot suppress movement artifacts in data segments with rapid head movements, such as those arising during motor seizures. Movement artifacts may deteriorate the localization accuracy of the system.
9
1
10
Introduction
NM24057A
2 CHAPTER 2
Using MaxFilter
2.1 Background MaxFilter can be applied to a FIFF-file with raw data or averaged MEG measurement results. The parameters needed in calculations are set to well-defined initial values, separately for Elekta Neuromag®, Neuromag System and Neuromag-122 data, and you can run the program without changing these values. However, sometimes it may be useful to tune the details of the Maxwell filtering operation. In brief, you can change the origin of the expansions and the dimensions and selection of the internal and external multipole bases. Optionally, you can manually identify and set bad channels that are not taken into account in the reconstruction. In cases where the source of interference is located inside or very close to the sensor array, it is recommended to use the spatio-temporal Maxwell filtering, tSSS. In addition, you can transfer data between different head positions and compensate disturbances due to head movements using MaxMove.
!
NM24057A
Warning: It is important that the user inspects both the input and the output data visually to judge the quality of the MaxFilter result.
11
2
Using MaxFilter
2.2 Launching the program 2.2.1 Graphical User Interface The graphical user interface, GUI, is a program that collects the input parameters of MaxFilter or MaxAve, and then runs the command-line program as a subprocess. You can monitor the execution on a log window (Section 2.8). The GUI can be launched in HP-UX 11: Click the Neuromag toolbox icon labeled as MaxFilter. Linux: Select the application menu Neuromag –> MaxFilter. Command line: /neuro/bin/X11/maxfilter_gui. Upon launching the program checks available licenses, and displays a welcome logo (Figure 2.1). Click Hide to close the window and to start using the main dialog (Figure 2.2).
Figure 2.1 MaxFilter welcome window.
2.2.2 Command line Alternatively, you can start MaxFilter from a command line as /neuro/bin/util/maxfilter -f input_file.fif [options] If no arguments are given, the program gives just a brief message: usage: maxfilter -f <infile> [options] ’maxfilter -help’ shows available options. A comprehensive list of the options is given in Appendix E. 12
NM24057A
Using MaxFilter
2
2.3 GUI main window
1. 2.
3. 4. Figure 2.2 MaxFilter GUI main window. The main window consists of the following areas: 1. The menubar. 2. A text area for showing current parameter values, or optionally a drawing area for estimated head position parameter curves. 3. Display area for showing the processing status. 4. A message text label at the bottom of the window. The menus and controls are described in the following sections. When you have defined the input and output filenames and modified the parameters, press Execute to start Maxwell filtering. The progress scale bar indicates the number of processed buffers. You can press Cancel to cancel processing. Then you can modify the parameters and try again (press Execute). The labels next to the Execute button indicate the number of warnings and errors reported by MaxFilter. During execution, the background colour of these labels is green. If there are warnings, background of the label warnings changes to red and the label reports the number of warnings. If MaxFilter is terminated due to a fatal error, background of the label errors turns to red. NM24057A
13
2
Using MaxFilter
The scale bar and the text label at the bottom indicate the status of the Maxwell filtering operation. You can view more detailed information of the MaxFilter output and warnings by selecting Show log... from the File menu. When you start MaxMove processing, the program starts head position estimation. Estimated head positions and fitting parameters can be shown in the drawing area of the main window (see Chapter 4).
2.4 Menus You can access any of the menu choices directly by first pressing the Alt<underlined letter in the menu name> and then <underlined letter in the menu choice>. For example, to select the Set directory... item from File menu, press Alt-f followed by d. The same procedure applies to menus found in other windows of the program as well.
2.4.1 File Load data... Open a new file for processing and set the Maxwell filtering job (Section 2.5). Working directory... Set the working directory. The directory is kept for output files until a new working directory is selected. Output options... Set the output file and other output options (Section 2.7). Show log... Show a log window to list the stdout and stderr outputs of MaxFilter and MaxAve (Section 2.8). Exit Quit the program.
2.4.2 Parameters Origin... Set the harmonic function expansion origin and coordinate frame (Section 3.2). Multipole selection... Set the harmonic function expansion orders and optimization for component selection (Section 3.3). Bad channels... Control the bad channel settings (Section 3.4). tSSS parameters... Change tSSS parameters (Section 3.5).
14
NM24057A
Using MaxFilter
2
LP filter and downsample... Set low-pass filtering and downsampling (Section 3.6). Head position estimation... Set the parameters to estimate head positions (Section 4.3). Fine-calibration... Set the fine-calibration adjustment file (Section 3.7). Cross-talk compensation... Set the cross-talk correction file (Section 3.7). Parallel processing... Set the number of parallel threads (Section 3.8).
2.4.3 Display Load head positions... Open a file for viewing previously estimated head positions (Section 4.4). Current settings... Show the current MaxFilter settings on the main window. Fit parameters... Show the head position estimation parameters (Section 4.4). Head positions... Show the estimated head positions (Section 4.4). Viewing scales... Set scalings for head position displays (Section 4.4).
2.4.4 Averager Load raw data... Select the raw data file to be averaged (Section 5.3). Output file... Select the file for saving the averages (Section 5.3). Rejection limits... Change averaging rejection limits (Section 5.4).
2.4.5 Help Why the beep? A brief explanation why the terminal bell was rung. View manual... Start a PDF viewer program to view this manual. On version... Show current version of MaxFilter, MaxAve and MaxFilter_GUI.
NM24057A
15
2
Using MaxFilter
2.5 Loading data MaxFilter accepts evoked or raw-data FIFF files as input. New data are loaded by selecting Load data... from the File menu (Figure 2.3).
1.
2. 3. 4. 5. 6.
Figure 2.3 Data loading dialog. The dialog has controls for 1. Input file selection. 2. Setting the SSS or tSSS interference suppression. 3. Optional selection for head position transformation. 4. Selection for head position estimation or movement correction. 5. Reusing previously set parameters and forcing to ignore warnings. 6. Showing the processing history of the selected file.
16
NM24057A
Using MaxFilter
2
2.5.1 Setting Maxwell filtering job After selecting the file, you must select the Maxwell filtering task in the file loading dialog. You can select either the spatial SSS or the spatio-temporal tSSS for interference suppression. The Head position task includes two menus. The first menu includes the choices to define the target head position: Use initial head position Default, use the initial hpifit result as the reference position. Transform to default head position The head and device coordinate axes are set to coincide. The origin of the device coordinate frame is used as the origin of the SSS expansions. Read head position from a file Pops up a file selection dialog, and the coordinate transformation in the selected file serves as the reference position. The second menu contains the options for continuous head position estimation and movement correction: No head position estimation Default, MaxMove tasks are not applied. Head position is however transformed according the previous selection. Movement correction (SSS) The head positions are estimated if they are not included in the input file. SSS interference suppression is done and the data are transformed to the reference head position (Section 4.6 on page 51). Movement correction (tSSS) The same as above except that tSSS is employed instead of SSS interference suppression. Head position estimation, no SSS Head positions are estimated from continuous HPI signals (see Section 4.4 on page 47). SSS interference suppression is not performed and the data are not transformed to the reference position. Head position estimation with tSSS Head positions are estimated from continuous HPI signals and tSSS interference suppression is performed. The data are however not transformed to the reference position. Upon selecting a new input file the program cleans all parameters values and resets the GUI dialogs. If you press the button Reuse the previous settings, the program applies the parameter values that were applied for the previous file. All output filenames are however cleared. If you press Show processing history, the program displays processing history of the selected file in the log window (see Section 2.8). NM24057A
17
2
Using MaxFilter
When the input data are successfully loaded, the working directory is changed to the directory containing the file. You can change the working directory by selecting Working directory... from the File menu. Thereafter, all processed files will be located in the selected working directory automatically, until you select a new working directory. This option is useful when you don’t have permission to write in the directory where the input file resides.
2.5.2 Ignoring warnings It is possible to bypass the warnings and error messages using the button Force to ignore warnings. The program tries to continue execution even if warnings or nonfatal error messages are encountered. The program is however terminated in a fatal error case. Note: Normally, the program checks if the output FIFF file already exists, and refuses to overwrite an existing file. When ignoring warnings, the program tries to overwrite an existing file without asking the user. However, overwriting cannot be done if the existing file is write-protected.
2.6 Time scale of raw data MaxFilter automatically sets the zero time to the beginning of the measurement session, i.e., the moment when the data acquisition was started. Usually, there is a delay before recording of raw data is started and the signal time does not start from zero. The raw data are stored in tagged blocks (called ‘tags’) in the FIFF file. MaxFilter first extracts the number of samples (nsamp) in a block. All blocks (except the very last one in the file) are assumed to contain the same nsamp. Time per block is then obtained as tbuf = nsamp/sfreq where sfreq is the sampling frequency. The program counts the number of data blocks (nbuf), the number of initial data skips (nskip1) and the number of skips in the middle of data (nskip2, i.e., if raw data recording was interrupted during data collection). Thereafter, MaxFilter sets the start time as t1 = nskip1 * tbuf, and end time as t2 = (nskip1 + nbuf + nskip2)* tbuf. All reporting of the program is based on this time scale. As an example, show_fiff output from a raw data file sampled with 1000 Hz shows: 104 = { 102 = raw data 301 = data skip [22] 300 = data buffer [128] 301 = data skip [55] 300 = data buffer [120] 105 = } 102 = raw data
18
NM24057A
Using MaxFilter
2
Here nsamp = 1000 and tbuf = 1 s. Thus, t1 = 22.0 s and t2 = (22 + 128 + 55 + 120) * 1 s = 325.0 s. Very long recordings may be splitted into continuation files. In such cases the program automatically detects if the file contains a tag labeled as FIFF_FIRST_SAMPLE and sets the start and end time according to it. Note: If you want to browse raw data exactly with this time scale on graph, you need to open Displays -> Control Panel, double click widget file, click resources, and de-activate compress-skips. If you are using the program mne_browse_raw, you need to select Keep the initial skip in the file opening dialog. Otherwise, the time shown by graph or mne_browse_raw may differ from MaxFilter reporting.
2.7 Output options After selecting the input datafile you can modify the output options by selecting Output options... from the File menu (Figure 2.4). Besides file selection, the dialog has controls for changing the output format and for setting data skips.
Figure 2.4 Output options.
NM24057A
19