User Tools

Site Tools


biac:analysis:topup_correction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
biac:analysis:topup_correction [2019/09/04 17:18]
cmp12
biac:analysis:topup_correction [2021/08/24 18:29] (current)
cmp12
Line 8: Line 8:
  
 You need to calculate readout time in seconds of the PEPOLAR images ( the physical time it takes to get the acquisition matrix of a single slice ) and get the polarity direction ( phase encode direction ). You need to calculate readout time in seconds of the PEPOLAR images ( the physical time it takes to get the acquisition matrix of a single slice ) and get the polarity direction ( phase encode direction ).
 +
  
 the readout time in seconds for the parameter file will be: the readout time in seconds for the parameter file will be:
-<​code>​readout = (echospacing * (acquisitionmatrix[0] * (percentsampling/​100))) / 1e6 +**For singleband images :** 
 +<​code>​ 
 +readout = (echospacing * (acquisitionmatrix[0] * (percentsampling/​100))) / 1e6 
  
 echospacing in the BXH header is in microseconds echospacing in the BXH header is in microseconds
 +</​code>​
 +
 +
 +**For mutli-band images the readout calculation is more complex:​** ​
 +<​code>​
 +readout = ( ( ceil ((1/​Round_factor) * AcquisitionMatrixPE / Asset_R_factor ) * Round_factor) - 1 ) * EchoSpacing * 0.000001
 +
 +AcquisitionMatrixPE = the acquisition size of the data ( acquisitionmatrix[0] )
 +Round_factor = 4 if partial fourier ( PFF is in scanoptions ), 2 if full fourier. ​ most all scans will be 4
 +Asset_R_factor = the reciprocal of the first value of dcm tag (0043,1083)
 </​code>​ </​code>​
  
 unfortunately at this point the polarity of the images will have to be determined from visual inspection. we aren't provided enough information in the metadata to give an entry into the BXH file ( yet ). unfortunately at this point the polarity of the images will have to be determined from visual inspection. we aren't provided enough information in the metadata to give an entry into the BXH file ( yet ).
  
-Here is a rough guide to help with inspection. ​ Take note of the eyeballs being crushed in for AP and stretched out for PA.+Here is a rough guide to help with inspection. ​ Take note of the eyeballs being crushed in for AP and stretched out for PA.  Below shows the PEPOLAR images in red/blue on top of a mean functional.
 {{:​biac:​analysis:​connneuro_func.png?​800|}} {{:​biac:​analysis:​connneuro_func.png?​800|}}
  
Line 65: Line 78:
 applytopup --imain=../​bia6_00186_009_01.nii.gz --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=run009 --verbose applytopup --imain=../​bia6_00186_009_01.nii.gz --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=run009 --verbose
 applytopup --imain=../​bia6_00186_010_01.nii.gz --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=run010 --verbose applytopup --imain=../​bia6_00186_010_01.nii.gz --inindex=1 --method=jac --datain=acq_params.txt --topup=rs_topup --out=run010 --verbose
 +</​code>​
 +
 +If you have the scenario where the functional data was acquired with acceleration,​ but the PEPOLAR images were not.  You can create an additional acq_params file with a modified readout time to help prevent over correction. ​ You will need to divide the echospacing by the sensefactor from your BXH header of the functional run.  If your functional data and PEPOLAR images have the same sensefactor,​ this compensation is not needed.
 +
 +<​code>​readout = ((echospacing/​sensefactor) * (acquisitionmatrix[0] * (percentsampling/​100))) / 1e6 
 +echospacing in the BXH header is in microseconds
 </​code>​ </​code>​
  
Line 91: Line 110:
 ==== Create your acq_params.txt file === ==== Create your acq_params.txt file ===
  
-the readout time in seconds for the parameter file will be: +calculate your readout time from above
-<​code>​readout = (echospacing * (acquisitionmatrix[0] * (percentsampling/​100))) / 1e6  +
- +
-echospacing in BXH header is in microseconds +
-</​code>​+
  
 the regular B0s will get the "​1"​ and the reverse phase B0s will get the "​-1"​ the regular B0s will get the "​1"​ and the reverse phase B0s will get the "​-1"​
Line 186: Line 201:
 If you are running dwidenoise, do it BEFORE dwipreproc. ​ If you are running dwidenoise, do it BEFORE dwipreproc. ​
  
-==== Calculate your readout time ==== +==== Calculate your readout time as mentioned above ====
-<​code>​readout = (echospacing * (acquisitionmatrix[0] * (percentsampling/​100))) / 1e6  +
- +
-echospacing in BXH header is in microseconds +
-</​code>​+
  
 ==== Prepare your input datasets ==== ==== Prepare your input datasets ====
Line 208: Line 219:
 For scenario 1, create your blip up / blip down B0 data the same way as above. For scenario 1, create your blip up / blip down B0 data the same way as above.
 <​code>​ <​code>​
-bxhselect --timeselect 0 bi +bxhselect --timeselect 0 bia6_00197_012.bxh bu 
-a6_00197_012.bxh bu +
 bxhselect --timeselect 0 bia6_00197_013.bxh bd bxhselect --timeselect 0 bia6_00197_013.bxh bd
 fslmerge -t bud bu.nii.gz bd.nii.gz fslmerge -t bud bu.nii.gz bd.nii.gz
Line 239: Line 249:
  
 <​code>​ <​code>​
-dwipre +dwifslpreproc ​dwi.mif dwi_corr.mif -rpe_pair -se_epi bud.nii.gz -pe_dir AP -readout_time 0.10656 ​ -debug
-proc dwi.mif dwi_corr.mif -rpe_pair -se_epi bud.nii.gz -pe_dir AP -readout_time 0.10656 ​ -debug+
  
 -rpe_pair specifies you're providing a pair of B0s ( regular, reversed ) -rpe_pair specifies you're providing a pair of B0s ( regular, reversed )
Line 293: Line 302:
 dwipreproc dwi.mif dwi_corr.mif -rpe_all -pe_dir AP -readout_time 0.10656 -debug dwipreproc dwi.mif dwi_corr.mif -rpe_all -pe_dir AP -readout_time 0.10656 -debug
  
--rpe_all signals that you've replicated ​ +- rpe_all signals that you've replicated ​ALL the directions with a rpe acquisition 
-+- pe_dir is the phase encode direction of your regular acquisition 
-LL the directions with a rpe acquisition +- readout_time from above  ​
--pe_dir is the phase encode direction of your regular acquisition +
--readout_time from above  ​+
 </​code>​ </​code>​
  
biac/analysis/topup_correction.1567617537.txt.gz · Last modified: 2019/09/04 17:18 by cmp12