Description: SAMers and SAMersc compute the averaged evoked response (3D+time) event-related functions of source moment, power, rank vector entropy, or conditional rank vector entropy (the latter for SAMersc, only) from multiple trial MEG, relative to one or two named markers. These programs are related to the legacy analysis, SAMerf. The required inputs are 1) the MEG dataset, 2) the beamformer coefficients from SAMwts, and 3) a parameter file to direct the analysis. The output is a 3D+time NIFTI formatted image.
Important: SAMers and SAMersc can also compute the differential averaged evoked response. If only one marker is specified in the parameter file, the output will be the averaged evoked response for that marker. If two markers are specified, the output will be the averaged evoked difference between the two events.
Two versions of this program - SAMers and SAMersc are offered. SAMers can compute averages of source moment or power, while SAMersc can additionally compute averages of rank vector entropy. The "c" in SAMersc denotes a "continuous" analysis, as will be explained, below.
SAMers applies the beamformer coefficients to the filtered MEG data (using ImageBand) to compute the sensor time series for each trial (the start and end times relative to each named marker) - including a baseline segment specified by the keyword Baseline. If, the ImageMetric is power, the sensor-space Hilbert envelope (unsmoothed) is computed for each trial. The average is accumulated over all trials. The sensor averages of moment or power are than projected to source space using the SAM coefficients computed by SAMwts. The source-space output is resampled as specified by the keyword TimeStep, and smoothed using a boxcar integrator, as specified by TimeInt. The output 3D+time image is written to a NIFTI file.
SAMersc reads and filters the MEG data according to the ImageBand keyword. The filtered data are then projected into source space for each voxel. The voxel (source) time series is computed over the entire dataset without respect to trials or markers. If power or rank vector entropy are selected as the ImageMetric, the voxel source time-series is transformed to that metric, using either Hilbert envelope, RVE, or conditional RVE. If power is selected, the Hilbert envelope is then lowpass filtered according to the SmoothBand keyword. The voxel time-series are subsequently parsed into trials and signal averaged, followed by baseline removal according to the Baseline keyword. The average is then resampled according to the TimeStep parameter. The averaged evoked response of source moment, power, RVE or conditional RVE are then written to a 3D+time NIFTI file.
Like SAMers, SAMersc can also compute differential averaged evoked responses if two markers are given. The marker times (start and end) must be identical to use the differential option.
It is strongly recommended that the SAMersc is used in the analysis, as this has the least bias.
Usage:
SAMers -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 SAMers/SAMersc works silently. An optional flag, -a, designates that the output be the absolute value of the specified metric
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.
SAMers and SAMersc differ as to which beamformer weights are permitted. The beamformer weights are designated in the parameter file by the CovType keyword. SAMers will accept one of these: "CovType GLOBAL" where the beamformer weights computed over the entire dataset, are applied, where the beamformer weights computed over the entire dataset, are applied, are applied, or "CovType ALL" - where the beamformer weights for each named marker are applied. Although the independent beamformer weights (ALL) are permitted in SAMers, 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. SAMersc permits only the SUM or GLOBAL weights.
The required parameter file keywords for SAMers and SAMersc are:
Optional keywords include:
Unlike previous SAM analyses, SAMers and SAMersc do not compute statistical comparisons among markers. The statistics such as pseudo-T, pseudo-F, T, F, or U, may be computed from the mean and variance images using the appropriate AFNI routines.
Examples parameters for imaging the averaged evoked response of source moment to a button press, in Taliarach space on an 8mm grid for SAMers:
NumMarkers | 1 | |||
Marker1 | Button | -5.0 | 1.0 | TRUE |
Baseline | -5.0 | -4.0 | ||
SignSegment | -0.5 | 0.5 | ||
XBounds | -10.0 | 10.0 | ||
YBounds | -9.0 | 9.0 | ||
ZBounds | -2.0 | 15.0 | ||
ImageStep | 0.5 | |||
TimeStep | 0.01 | |||
TimeInt | 0.02 | |||
ImageFormat | TLRC | 8.0 | ||
CovBand | 0.0 | 100.0 | ||
ImageBand | 0.0 | 15.0 | ||
OrientBand | 14.0 | 30.0 | ||
ImageMetric | Signal | |||
CovType | SUM | |||
MRIDirectory | /data1/mri | |||
ImageDirectory | N-Back,1200Hz/Images |
Since the SAM beamformer has ambiguous polarity (except when used with the Atlas keyword, for which dipole orientation is specified), the keyword SignSegment can be used to designate a time segment relative to the marker for which the polarity should be positive. If that segment is negative, then the polarity of the average for that voxel is inverted.