|
Main /
AnalysisWithNutMegNUTMEG (Neurodynamic Utility Toolbox for Magnetoencephalo- and Electroencephalo- Graphy) is an MEG/EEG analysis toolbox for reconstructing the spatiotemporal dynamics of neural activations and overlaying them onto structural MR images. The toolbox runs under MATLAB in conjunction with SPM2/SPM8 and can be used with the Linux/UNIX, Mac OS X, and even Windows platforms. Why is Nutmeg interesting The major advantage of NUTMEG compared to other source reconstruction softwares is that it implements a beamforming source reconstruction of the time-frequency dynamics of cortical activity by creating a set of weights customized to each time-frequency window. This procedure should avoid the bias caused by the predominant low-frequency power on the weight computation when it's not frequency-dependent. Note that the reconstructed signal is the power at a specific time frequency window, while it is currently not possible to reconstruct the phase. Details in NutmegTimeFrequencyBeamformer. Why is Nutmeg not reliable yet on Neuromag data ATTENTION: We are currently testing Nutmeg on our Neuromag data with the help of Sarang Dalal, one of the main developers, and we encountered one major problem (apparently shared by all beamforming algorithms): beamforming hardly deals with not-full-rank covariance matrices. Since MaxFilter reduces the rank of the covariance matrix by removing noisy components, it is not clear yet how to deal with MaxFilter preprocessing in Nutmeg. So for the moment use this software at your own risk! How to design your experiment for time-frequency (tf) source reconstruction. * As a rule of thumb, a baseline of 500 ms to 1s is necessary for reliable data reconstruction in time-frequency source space. A longer baseline is needed for frequencies lower than ~5 Hz. * Do NOT filter the data at any processing step! * Eye movement and blink artifacts are not very important since they are broadband signals. Only epochs with paroxistic artifacts should be removed. * tf analysis can be done on average data (only phase-locked) or epoched trials (phase-locked + induced activity) How to use Nutmeg Download the last version of Nutmeg here: Download Nutmeg. Importing the data There are currently two ways to import data in Nutmeg: * Via MNE Segmentation with Brainvisa and convert file in nifti format using: AimsFile Convert -i irm.ima -o irm.nii 1. Use MNE fonctions to import your data (raw, sss or ssst) into matlab together with the corresponding events of interest. 2. Epoch your data in matlab and concatenate the runs. Save as DATA.mat 3. For now, it seems that the lead field computed with MNE leads to better results than lead field computed with Brainstorm. 4. Open Session; Load DATA.mat 5. Coregister your MRI, mark fiducial points. * Via Brainstorm (BST) (forward model and anatomy) and Fieldtrip (FT) (data) 1. Import forward model, anatomy and channel position from BST - Launch BST - import channel file by selecting a(ny) .fif file from your study and saving as 'chanfile.mat' the file "channel_vectorview306.mat" (contains a complete description of the sensors) that you find in the BST folder "database/subject/@default_study". - right-click on subject => compute head model (compute forward model) - right click on forward model => export to matlab, save as 'forwfile.mat' - right-click "cortex_brvisa_15000V" => export to matlab, save as 'cortexfile.mat' 2. Prepare epoched data with FT => in "data" matlab structure. 3. Import all in Nutmeg: - Include the updated (31st May 2010) conversion scripts (in /neurospin/meg/meg_tmp/tools_tmp/nutmeg_tmp/) - Check that matlab paths to SPM8, Nutmeg and your own scripts are properly set. - On matlab, type: nuts = nut_ft2nuts(data); nuts = nut_bst2nuts(nuts, forwfile, chanfile, cortexfile); - Save the Nutmeg data structure: save MySESSION nuts. 4. Warnings: - Up to now, the function nut_ft2nuts works only with magnetometers. Sarang should update it soon for all types of sensors. - The forward model computed with Brainstorm is limited to the cortical surface. Better forward models might be considered. - There's a doubt on the unit of measure used in the BST forward model. We'll check it out soon. Source reconstruction * Source analysis: Time series SourceAnalysisTimeSeries <=> phase-locked/time averaged data; for this, use the eigenvector beamformer Control and Active windows should have the same number of sample points The number "Log" provides you with en estimate of how easy it is to convert the covariance matrix and it should be fairly low (~3 to 5). If it is red, the reconstruction will be unreliable... Avoid using any filtering. * Source analysis: Time-Freq series SourceAnalysisTF <=> time-epoched data; for this, use the LCMV scalar beamformer Select FIRLS bandpass filters, order = 200 and appropriate time windows to construct your entire tf (add and repeat for all tf of interest). An m-file will be automatically written containing the script (nut_tfbf2mat) * Tips : You can check the rank of the covariance matrix by typing "rank(nuts_cov(nuts.meg.data,1))", the best rank is full rank (= number of channels). Or you can compute the condition number: "cond(nuts.cov(nut.meg.data,0))" (the number should be low (?)) More soon... |