Diff for "SensorSpm" - Meg Wiki
location: Diff for "SensorSpm"
Differences between revisions 5 and 6
Revision 5 as of 2008-11-12 18:00:14
Size: 2398
Editor: JasonTaylor
Comment:
Revision 6 as of 2008-11-12 18:01:24
Size: 2431
Editor: JasonTaylor
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
Figure: A word-pseudoword effect over 19 subjects. Figure: A word-pseudoword effect (N=19) on magnetometers and gradiometer magnitude.

Creating and Viewing 3D Sensor SPMs

3D topography x time sensor SPMs can help you identify the latency and location of effects in sensor space.

attachment:WdNw3dSensorSpm.jpg

Figure: A word-pseudoword effect (N=19) on magnetometers and gradiometer magnitude.

1. Select an averaged file (m*.mat), split it into separate files for magnetometers, gradiometers, and gradiometer-magnitude (m*-mags.mat, m*-grds.mat, and m*-grms.mat, respectively).

clear S
S.D='mae_mydata.mat';
spm_eeg_splitFIF_grms(S);

2. Write image volumes.

% Select options (see help for spm_eeg_convertmat2ana3D):
clear S
S.interpolate_bad = 0;
S.n = 32;
S.pizsize = 3;
% Select trial types:
S.trialtypes = [1 2];
% Mags:
S.Fname = 'mae_mydata-mags.mat';
spm_eeg_convertmat2ana3D(S);
% Grad magnitude:
S.Fname = 'mae_mydata-grms.mat';
spm_eeg_convertmat2ana3D(S);

3. Then compute an ANOVA over subjects (use GUI to batch, or a script if you have one).

4. To view the results, navigate to the directory that contains the SPM.mat for your ANOVA. In an SPM window, click 'Results', Select SPM.mat, Unwhitened EOI, don't mask, whatever title, choose your p-value and extent thresholds (I usually start with .001 and 0). Click 'whole brain' to view whole-volume results. The coordinates on the far right show x (mm), y (mm), and time (ms).

Ignore the glass brain images. To view the cloud-in-a-box images, click 'overlays'->'sections', and select mask.img. Lovely. If you want to write out the image volume, click 'save' and give it a name. You can then view it using 'Display' or 'Check Reg'.

If you want to correct for extent, rather than 'Results', click 'Toolbox'->'ns'. Select SPM.mat, Unwhitened EOI, don't mask, whatever title, no p-value adjustment, threshold {p} .001 (or your choice), extent threshold 0. The leftmost column ('cluster-level p-corrected') shows p-values corrected for cluster extent. Note that this information was absent when you clicked 'Results'.

If you want to view or write out an image thresholded for cluster extent, determine what cluster size ('cluster-level k-voxel') needed to achieve your desired p-value ('cluster-level p-corrected'; e.g., 0.05). Then follow the above 'Toolbox'->'ns' directions, but this time enter the k-voxel extent threshold when prompted (e.g., 200). Now the results are thresholded for both height and extent. View and save as above.

CbuMeg: SensorSpm (last edited 2013-03-08 10:02:45 by localhost)