-
Notifications
You must be signed in to change notification settings - Fork 5
Phase Encoding Analysis (Matlab)
In phase-encoded retinotopic mapping stimulation is periodic, allowing polar angle (rotating wedge) and eccentricity (expanding / contracting ring) to be encoded in the phase of the BOLD signal observed in each voxel. This phase can be extracted in a number of ways (e.g. cross-correlation). In the PEA
tool provided in the CNI toolbox, the phase is extracted by using a cosine and sine wave at the stimulation frequency as predictors in a linear regression. This allows not only to extract phase and amplitude of each voxel's response from the fit beta coefficients, but also to obtain an F-statistic and p-value to assess statistical significance. Below follows an instruction on how to use the tool.
The tool needs to be instantiated with a number of parameters:
- f_sampling - sampling frequency of data acquisition (1 / TR)
- f_stim - stimulation frequency of the retinotopy experiment
- n_samples - number of samples (functional volumes)
- n_rows - number of rows (1st volumetric dimension of 4D data tensor)
- n_cols - number of columns (2nd volumetric dimension of 4D data tensor)
- n_slices - number of rows (3rd volumetric dimension of 4D data tensor)
parameters.f_sampling = sampling_frequency;
parameters.f_stim = stimulation_frequency;
[parameters.n_samples,...
parameters.n_rows,...
parameters.n_cols,...
parameters.n_slices] = size(data);
pea = PEA(parameters);
The pea
instance can now be used to analyze data from runs sharing the same basic parameters specified before. For each of such run, a signal delay (in seconds; caused by the sluggishness of the BOLD signal) and a direction of rotation needs to be specified. Note that contracting rings are considered to move clockwise while expanding rings are consider to move counter-clockwise.
pea.set_delay(delay_value);
pea.set_direction('ccw');
results = pea.fitting(data);
During fitting, voxels whose mean signal intensity falls below a threshold will be skipped during analysis.
This threshold can be adjusted. Specifically, the fitting
function takes two optional arguments:
- threshold - a mean signal intensity threshold below which a voxel is skipped (default = 100)
- mask - a binary mask specifying for which voxels the analysis shouldbe carried out
The function returns a structure (results
) with four fields:
- phase - phase of a voxel's signal at stimulation frequency
- amplitude - amplitude of a voxel's signal at stimulation frequency
- f_statistic - F statistic per voxel
- p_value - P value per voxel
These fields retain the volumetric dimensions of the data.