biac:analysis:physiological
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
biac:analysis:physiological [2011/11/03 18:40] – [Physiological Correction Methods] petty | biac:analysis:physiological [2022/01/20 14:46] – cmp12 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Physiological Correction Methods ====== | ====== Physiological Correction Methods ====== | ||
- | Currently this assumes that you have recorded your physiological responses through Cigal. | + | ===== Generate resampled TSV from raw GE physio files automatically copied from the scanners |
- | There' | + | Stock GE physio is hardcoded by GE to be 25Hz for respiration and 100Hz for pulse. |
- | This tool uses various fields from the bxh and pdigm file to output " | ||
- | The python tool will call cigal functions directly to do the corrections, then output new text data in the format requested. | + | < |
+ | [cmp12@blade17 20211218_03399]$ / | ||
+ | usage: convert_GEphysio.py [-h] --xmlh XMLFNAME [--json JSONFNAME] --physdir | ||
+ | | ||
+ | | ||
+ | |||
+ | create 100Hz resampled TSV from raw GE physio data | ||
+ | |||
+ | optional arguments: | ||
+ | -h, --help | ||
+ | --xmlh XMLFNAME | ||
+ | --json JSONFNAME | ||
+ | --physdir PHYSDIR | ||
+ | --bidsout | ||
+ | --afnislicetime | ||
+ | --delay DELAYTIME | ||
+ | | ||
- | < | ||
- | physio_create.py --help | ||
</ | </ | ||
- | < | + | Provide a valid BXH ( and JSON if possible ) and a path to your subject physio folder |
- | physio_create.py --bxh /path/to/run4.bxh --pdigm /path/to/ | + | |
- | Program to produce formatted physiological data: | + | This function |
- | Data will be corrected and recreated from the pdigm file based on information from run data | + | |
- | BXH and PDIGM required | + | |
- | OUTPATH defaults to PWD | + | |
- | HZ sampling rate | + | |
- | FORMAT: defaults to fsl | + | |
- | - fsl = cardio, | + | |
- | - npm = time, | + | |
- | - afni = cardiac.txt, | + | |
+ | 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. | ||
- | Options: | + | < |
- | -h, --help | + | / |
- | -b FILE, --bxh=FILE bxh file for run | + | |
- | | + | |
- | pdigm file for run | + | |
- | | + | |
- | output format ( fsl, | + | |
- | --hz sampling rate is hz ( 100 ) | + | |
- | -o PATH, --outpath=PATH | + | |
- | location to store output files | + | |
</ | </ | ||
- | ===== AFNI ===== | + | By default you will get a 100Hz resampled TSV with headers and timing. |
- | Create the AFNI formated physiological text data. | ||
- | <code bash> | ||
- | This would create my " | + | The **--bidsout** flag will output a TSV without headers |
- | Now set-up build the regressors that will be used in afni with their matlab tool. | ||
- | <code matlab> | + | The **--afnislicetime** flag will output two 1D slicetiming files to be used with RetroTS.py and afni_proc.py directly. |
- | addpath / | + | |
- | Opt.Respfile = '/ | + | |
- | Opt.Cardfile = '/ | + | |
- | Opt.VolTR = 1.5 | + | |
- | Opt.Nslices = 34 | + | |
- | Opt.PhysFS = 100 | + | |
- | RetroTS(Opt) | + | === Using afni === |
- | </ | + | |
- | The output will be **" | + | You can create |
- | Convert your data to 4D nifti if you haven' | + | < |
- | < | + | python3 / |
- | Create the afni script which you will use to actually run the 3dretroicor functionality: | + | -n #slices |
- | <code bash> | + | -v TR in seconds |
- | ss_method 'per-run'</ | + | |
- | The result of the above command would be a tcsh script, which would run the despiking and 3dretroicor correction only. Run it: | ||
- | <code bash> | ||
- | |||
- | There will be a resulting folder with all the afni data inside. | ||
- | <code bash> | ||
- | #convert afni to nii, create bxh | ||
- | 3dAFNItoNIFTI 12345.results/ | ||
- | fslwrapbxh pb02.12345.r01.ricor.BRIK | ||
</ | </ | ||
- | Run the resting state pipeline: | + | RetroTS will produce " |
- | <code bash> | + | |
- | ===== FSL Feat ===== | + | |
- | We've gotten the FSL beta functions for physiological correction, which we'll test. | ||
- | They are based on the same algorithms used in afni with retroicor. | ||
- | More information can be seen here: | ||
- | [[http:// | ||
- | The beta options will allow you to plug in the resulting regressors directly into Feat. After pre-processing you can use the **res4d.nii.gz** files for further analysis ( filtered_func_data would not have the physio regressor removed ). | ||
+ | ====== CIGAL pdigm specific ====== | ||
+ | [[biac: | ||
biac/analysis/physiological.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1