Prepare — Retinotopy (PRF)#
What are we preparing?#
Population receptive field (PRF) / retinotopy analyses also rely on
vistadisplog .mat files to record what stimulus was shown during each
acquisition. The prepare step for PRF is simpler than for GLM: there is no
first-level model to fit at prepare time, so the only goal is to produce a
clean mapping TSV that links every log file to its corresponding BIDS run.
This mapping TSV is the single output of the PRF prepare stage. It is used downstream by:
the GLM prepare pipeline (to match logs → NIfTIs via acquisition time);
any custom analysis script that needs to know which stimulus condition corresponds to which bold file.
How the pipeline works#
Scan for log files#
PRFPrepare looks for
20*.mat files under
<bidsdir>/sourcedata/vistadisplog/sub-<sub>/ses-<ses>/ and sorts them in
ascending filename order (= acquisition order).
Parse each log#
For every .mat file:
params.loadMatrixis read to retrieve the basename of the stimulus file used during that run.The stimulus basename is parsed to extract the original task label (the second
_-separated token, e.g.fixRW) and a per-task run counter.The log filename encodes the run end time; 6 minutes are subtracted to recover the approximate start time that will match the BIDS
AcquisitionTime.
When called with lc_glm=True (from the GLM prepare pipeline), the method
additionally computes a normalised GLM task-run label (fixnonstop or
fixblock) and appends it as a glm_task_run column.
Write the mapping TSV#
The resulting table is written to the vistadisplog directory as
sub-<sub>_ses-<ses>_desc-mapping_PRF_acqtime.tsv with the following
columns:
Column |
Description |
|---|---|
|
Full path to the |
|
Basename of the |
|
Basename of the stimulus |
|
Original task label + per-original-task run counter,
e.g. |
|
Estimated acquisition start time ( |
|
(GLM mode only) Normalised task label + counter,
e.g. |
API reference#
See API Reference for the full auto-generated documentation of all classes and functions in this module:
launchcontainers.prepare.prf_prepare.PRFPrepare