Blip distortion correction via FSL TOPUP (uses the *_epi field maps) reads in DwellTime from the field map's meta-data in the JSON sidecars. It uses the dwell time to calculate the total readout time for use in the acquisition parameters file that is supplied to the topup commandline call.
However, some datasets have field maps that only have the TotalReadoutTime but no DwellTime listed in the meta-data. For these data, the total readout time should be easily read into topup directly. But right now, CPAC will complain that DwellTime is missing and cannot proceed.
Proposed feature
Build the plumbing to read in TotalReadoutTime from the JSON meta-data, and use that first for topup if supplied.
Acceptance criteria
[x] Working directory shows the TotalReadoutTime value present in the JSON meta-data for the field map being written into the acqparams.txt created in the FSL TOPUP workflow's phase_encodenode.
[x] Sanity check against external pipeline which uses the same information to calculate the distortion correction unwarp.
Related problem
Blip distortion correction via FSL TOPUP (uses the
*_epi
field maps) reads inDwellTime
from the field map's meta-data in the JSON sidecars. It uses the dwell time to calculate the total readout time for use in the acquisition parameters file that is supplied to thetopup
commandline call.However, some datasets have field maps that only have the
TotalReadoutTime
but noDwellTime
listed in the meta-data. For these data, the total readout time should be easily read intotopup
directly. But right now, CPAC will complain thatDwellTime
is missing and cannot proceed.Proposed feature
Build the plumbing to read in
TotalReadoutTime
from the JSON meta-data, and use that first fortopup
if supplied.Acceptance criteria
TotalReadoutTime
value present in the JSON meta-data for the field map being written into theacqparams.txt
created in the FSL TOPUP workflow'sphase_encode
node.Alternatives
No response
Additional context
No response