Description: SAM3d and SAM3dc compute static 3D event-related functions of power or rank vector entropy, from multiple trial MEG, relative to one or more named markers. The required inputs are 1) the MEG dataset, 2) the beamformer coefficients from SAMwts, and 3) a parameter file to direct the analysis. Two NIFTI formatted images, for the mean and variance of trials are computed for each named marker.
Two versions of this program - SAM3d and SAM3dc are offered. They differ in the order in which the functions of power or RVE are computed and parsed. The "c" denotes a "continuous" analysis over all samples, as will be explained.
SAM3d first applies the beamformer coefficients to the filtered MEG data (using ImageBand) to compute the source time series for each marked trial (the start and end times relative to each named marker). Next, the metric function (either power or entropy) is computed for each trial. The statistical mean and variance for each voxel, over all trials, is saved and written to their respective image files.
By contrast, SAM3dc applies the beamformer weights to the filtered MEG data over the entire time series - without respect to epochs or markers. The metric function (either power or entropy) is then computed continuously over the entire time series. The resulting metric time series for every voxel is then parsed into trials and the mean and variance accumulated over all trials for each marker and then written to their respective image files.
The problem that arises for SAM3d is that the functions of power and especially RVE are biased by their being computed over the segments of each trial. Short time segments add uncertainties to these measures. To reduce this bias, SAM3dc computes power and entropy over the entire dataset time series, for every voxel. This makes SAM3d faster than SAM3dc.
Nonetheless, it is strongly recommended that the SAM3dc is used in the analysis.
Usage:
SAM3d -r <dataset_name> -m <parameter_file_name> -v
The -r flag is followed by the dataset name (with or without the .ds suffix). The -m flag is followed by the parameter file name without the .param suffix. The -v argument specifies verbose output — else SAM3d works silently.
The NIFTI image files will be either "ortho" (the designated ROI and grid spacing from the parameter file) or "tlrc" (Talairach space and resolution) depending upon the ImageFormat keyword used to compute the SAM weights.
SAM3d and SAM3dc differ as to which beamformer weights are permitted. The beamformer weights are designated in the parameter file by the CovType keyword. SAM3d will accept one of these: "CovType GLOBAL" — where the beamformer weights computed over the entire dataset, are applied, "CovType SUM" — where the beamformer weights computed for the sum of all marked trials, are applied, or "CovType ALL" — where the beamformer weights for each named marker are applied. Although the independent beamformer weights (ALL) are permitted in SAM3d, they may introduce unwanted bias because they are derived from the covariance of short data segments. The SUM or GLOBAL weights should be used whenever possible. SAM3dc permits only the SUM or GLOBAL weights.
The required parameter file keywords for SAM3d are:
Optional keywords include:
Unlike previous SAM analyses, SAM3d and SAM3dc do not compute statistical comparisons among markers. The statistics such as pseudo-T, pseudo-F, T, F, or Mann-Whitney U, may be computed from the mean and variance images using the appropriate AFNI routines.
Examples parameters for imaging beta-band power in the presence of broad-band noise, in Taliarach space on an 8mm grid:
NumMarkers | 3 | |||
Marker1 | 9r0 | -0.25 | 0.25 | TRUE |
Marker2 | 9r1 | -0.25 | 0.25 | TRUE |
Marker3 | 9r2 | -0.25 | 0.25 | TRUE |
XBounds | -12 | 12 | ||
YBounds | -9 | 9 | ||
ZBounds | -2 | 15 | ||
ImageStep | 0.5 | |||
ImageFormat | TLRC | 8.0 | ||
Mask | /data2/Mask8mm.nii | |||
CovBand | 4 | 100 | ||
ImageBand | 14 | 30 | ||
OrientBand | 14 | 30 | ||
ImageMetric | Power | |||
CovType | SUM | |||
MRIDirectory | /data1/mri | |||
ImageDirectory | /data1/N-Back,1200Hz/Images |
Two 3D image files for the mean and variance of each of the three markers (6 image file total) will be output to the named directory.