User Tools

Site Tools


biac:analysis:physiological

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 Both sides next revision
biac:analysis:physiological [2022/01/18 16:09]
cmp12
biac:analysis:physiological [2022/01/18 16:29]
cmp12
Line 2: Line 2:
  
 ===== Generate resampled TSV from raw GE physio files automatically copied from the scanners  ===== ===== Generate resampled TSV from raw GE physio files automatically copied from the scanners  =====
 +
 +Stock GE physio is hardcoded by GE to be 25Hz for respiration and 100Hz for pulse.  The continuous gating files will start 30 seconds before the scan is triggered.
 +
  
 <code> <code>
Line 23: Line 26:
 </code> </code>
  
 +Provide a valid BXH ( and JSON if possible ) and a path to your subject physio folder to convert_GEphysio.py function.  If the BXH does not contain slice timing information the JSON is required.
 +
 +This function will search the physio directory for physio files within a specified time range based on the functional scantime + timepoints + a default delay in writing.
 +
 +If matching respiration and pulse files are found theoretical scan triggers on each TR will be created and the respiration and pulse data will be resampled to 100Hz and locked to the onset of the scan.  If disdaqs are detected in the BXH the corresponding physio time will be discarded.
 +
 +<code>
 +/usr/local/packages/biacpython/bin/convert_GEphysio.py --xmlh Data/Func/20211218_03399/bia6_03399_004_01.bxh --physdir Data/Func/20211218_03399 --bidsout
 +</code>
 +
 +By default you will get a 100Hz resampled TSV with headers and timing.
 +
 +
 +The **--bidsout** flag will output a TSV without headers and a BIDS sidecar with appropriate column labels and sampling frequency.
 +
 +
 +The **--afnislicetime** flag will output two 1D slicetiming files to be used with RetroTS.py and afni_proc.py directly.
 +
 +=== Using afni ===
 +
 +You can create regressors for afni preprocessing from output files above using RetroTS.py
 +
 +<code>
 +python3 /usr/local/packages/afni/21.1.04/RetroTS.py -phys_file series013_01_physio.tsv -phys_json series013_01_physio.json -n 42 -v 2 -slice_order series013_01_slicetimingV.1D -prefix  series013_01
 +
 +-n #slices
 +-v TR in seconds
 +
 +</code>
 +
 +RetroTS will produce "slibase" regressors to be used with retroicor during afni preprocessing, or afni retroicor regression 
  
 + 
  
  
-===== CIGAL specific =====+====== CIGAL pdigm specific ======
  
 Currently this assumes that you have recorded your physiological responses through Cigal.  Also, these types of corrections should be done **before** any type of slice-time correction or pre-processing. Currently this assumes that you have recorded your physiological responses through Cigal.  Also, these types of corrections should be done **before** any type of slice-time correction or pre-processing.
biac/analysis/physiological.txt · Last modified: 2023/02/23 18:43 (external edit)