Rapidtide is a suite of Python programs used to model, characterize, visualize, and remove time varying, physiological blood signals from fMRI and fNIRS datasets. The primary workhorses of the package are the rapidtide program, which characterizes bulk blood flow, and happy, which focusses on the cardiac band.
Allocate an interactive session and run the program. Sample session:
[user@biowulf]$ sinteractive [user@cn3335 ~]$ module load rapidtide [+] Loading singularity 4.0.1 on cn3335 [+] Loading rapidtide 2.8.2Available executables:
[user@cn3335 ~]$ ls $RT_BIN ccorrica happy polyfitim rapidtide2std resamplenifti showhist showtc spatialdecomp temporaldecomp glmfilt histnifti rapidtide resamp1tc shell showstxcorr showxcorrx tcfrom3col tidepoolUsage:
[user@cn3335 ~]$ rapidtide -h ... [user@cn3335 ~]$ happy -h ...etc.
[user@cn3335 ~]$ git clone https://github.com/bbfrederick/rapidtide [user@cn3335 ~]$ cd rapidtide [user@cn3335 ~]$ happy rapidtide/data/examples/databundle/sub-HAPPYTEST.nii.gz \ rapidtide/data/examples/databundle/sub-HAPPYTEST.json \ rapidtide/data/examples/testdatabundle.tgz ... processing command line arguments running version 2.8.3+31.gbdf5c539 on host cn2895 tr is 1.16 seconds, mrsamplerate is 0.862 projmask has 112685 voxels above threshold. Normalizing voxels... Detrending to order 3 ... Voxel: 100%|██████████████████████████████████████████████████████████████████| 112685/112685 [00:09<00:00, 12367.61voxels/s] done Normalization took 10.458 seconds Not using separate estimation mask - doing initial estimate using intensity mask estmask has 112685 voxels above threshold. starting pass 1 of 2 estimating cardiac signal from fmri data 64 slice times with 16 unique values - diff is 0.073 Making slice means... Averaging slices... done Slice sample rate is 13.793 Notch filtering... Bad point threshhold set to 3.015 using the mad method for cardfromfmri_sliceres extracting harmonic components Filtering Envelope detection Normalizing Bad point threshhold set to 3.015 using the mad method for cardfromfmri_25.0Hz dlfilter could not be loaded - skipping entering phaseanalysis Filtering phase waveform Starting phase projection lookaheadval = 3 Phase projecting... Slice: 100%|█████████████████████████████████████████████████████████████████████████████| 64/64 [00:13<00:00, 4.73slices/s] done Phase projection done hard, soft vessel threshholds set to 990.509 396.204 starting pass 2 of 2 estimating cardiac signal from fmri data 64 slice times with 16 unique values - diff is 0.073 Making slice means... Averaging slices... done Slice sample rate is 13.793 Notch filtering... Bad point threshhold set to 3.015 using the mad method for cardfromfmri_sliceres extracting harmonic components Filtering Envelope detection Normalizing Bad point threshhold set to 3.015 using the mad method for cardfromfmri_25.0Hz dlfilter could not be loaded - skipping entering phaseanalysis Filtering phase waveform Starting phase projection lookaheadval = 3 Phase projecting... Slice: 100%|█████████████████████████████████████████████████████████████████████████████| 64/64 [00:12<00:00, 5.12slices/s] done Phase projection done hard, soft vessel threshholds set to 1399.694 559.878 Processed on cn2895 Clock time Program time Duration Description 20240326T115909 0.00 0.00 Start 20240326T115909 0.01 0.01 Argument parsing done 20240326T115909 0.03 0.03 Argument parsing done 20240326T115909 0.69 0.65 Image data read in 20240326T115910 1.59 0.91 Mask created 20240326T115910 1.61 0.01 Mask saved 20240326T115910 1.61 0.00 Slice times determined 20240326T115919 10.80 9.20 Detrending finished (40265.22 voxels/second) 20240326T115921 12.15 1.34 Normalization finished (275338.63 voxels/second) 20240326T115921 12.39 0.24 Cardiac signal generated from image data - pass 1 20240326T115921 12.41 0.03 Cardiac signal from image data analyzed - pass 1 20240326T115927 18.11 5.70 Cardiac signal from image data resampled and saved - pass 1 20240326T115927 18.11 0.00 Phase waveform generated - pass 1 20240326T115927 18.15 0.04 Slice phases determined for all timepoints - pass 1 20240326T115927 18.15 0.00 Output arrays allocated - pass 1 20240326T115927 18.15 0.00 Phase projection to image started - pass 1 20240326T115941 32.12 13.97 Phase projection to image completed - pass 1 20240326T115941 32.12 0.00 Phase projected data saved - pass 1 20240326T115941 32.92 0.79 Vessel masked phase projected data saved - pass 1 20240326T115941 32.96 0.04 Masks saved - pass 1 20240326T115941 32.98 0.02 Cardiac signal generated from image data - pass 2 20240326T115942 33.00 0.02 Cardiac signal from image data analyzed - pass 2 20240326T115947 38.84 5.84 Cardiac signal from image data resampled and saved - pass 2 20240326T115947 38.94 0.10 Phase waveform generated - pass 2 20240326T115947 38.98 0.04 Slice phases determined for all timepoints - pass 2 20240326T115948 38.99 0.01 Output arrays allocated - pass 2 20240326T115948 38.99 0.00 Phase projection to image started - pass 2 20240326T120000 51.88 12.90 Phase projection to image completed - pass 2 20240326T120006 57.37 5.48 Phase projected data saved - pass 2 20240326T120007 58.15 0.78 Vessel masked phase projected data saved - pass 2 20240326T120007 58.28 0.13 Masks saved - pass 2 20240326T120007 58.41 0.13 Done [user@cn3335 ~]$ exit [user@biowulf ~]$