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.2.2 on cn3335 [+] Loading rapidtide 3.0.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 ... running version 3.0.2 on host cn0094 loading data from rapidtide/data/examples/databundle/sub-HAPPYTEST.nii.gz tr is 1.16 seconds, mrsamplerate is 0.862 fmri_data has shape (370240, 110) projmask has 112685 voxels above threshold. Normalizing voxels... Detrending to order 3 ... Voxel: 100%|██████████████████████████████████████████| 112685/112685 [00:39<00:00, 2857.21voxels/s] done Normalization took 40.544 seconds Not using separate estimation mask - doing initial estimate using intensity mask estweights 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 threshold set to 3.015 using the mad method for cardfromfmri_sliceres extracting harmonic components Filtering Envelope detection Normalizing Bad point threshold set to 3.015 using the mad method for cardfromfmri_25.0Hz dlfilter could not be loaded - skipping entering phaseanalysis Filtering phase waveform tr=1.16 timepoints=110 numsteps=16 args.upsamplefac=100 Starting phase projection lookaheadval = 3 Phase projecting... Slice: 100%|████████████████████████████████████████████████████| 64/64 [00:11<00:00, 5.67slices/s] done Phase projection done hard, soft vessel thresholds set to 995.532 398.213 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 threshold set to 3.015 using the mad method for cardfromfmri_sliceres extracting harmonic components Filtering Envelope detection Normalizing Bad point threshold set to 3.015 using the mad method for cardfromfmri_25.0Hz dlfilter could not be loaded - skipping entering phaseanalysis Filtering phase waveform tr=1.16 timepoints=110 numsteps=16 args.upsamplefac=100 Starting phase projection lookaheadval = 3 Phase projecting... Slice: 100%|████████████████████████████████████████████████████| 64/64 [00:10<00:00, 5.84slices/s] done Phase projection done hard, soft vessel thresholds set to 1093.755 437.502 Processed on cn0094 Clock time Program time Duration Description 20250429T115954 0.00 0.00 Start 20250429T115954 0.08 0.08 Argument parsing done 20250429T115954 0.08 0.00 Argument parsing done 20250429T115954 0.56 0.48 Image data read in 20250429T115955 1.32 0.75 Mask created 20250429T115955 1.33 0.01 Mask saved 20250429T115955 1.33 0.00 Slice times determined 20250429T120034 40.85 39.52 Detrending finished (9369.53 voxels/second) 20250429T120035 41.95 1.10 Normalization finished (335328.47 voxels/second) 20250429T120036 42.19 0.24 Cardiac signal generated from image data - pass 1 20250429T120036 42.22 0.03 Cardiac signal from image data analyzed - pass 1 20250429T120040 46.74 4.52 Cardiac signal from image data resampled and saved - pass 1 20250429T120040 46.74 0.00 Phase waveform generated - pass 1 20250429T120040 46.77 0.03 Slice phases determined for all timepoints - pass 1 20250429T120040 46.77 0.00 Output arrays allocated - pass 1 20250429T120040 46.77 0.00 Phase projection to image started - pass 1 20250429T120052 58.43 11.66 Phase projection to image completed - pass 1 20250429T120052 58.43 0.00 Phase projected data saved - pass 1 20250429T120053 59.08 0.65 Vessel masked phase projected data saved - pass 1 20250429T120053 59.12 0.04 Masks saved - pass 1 20250429T120053 59.15 0.03 Cardiac signal generated from image data - pass 2 20250429T120053 59.17 0.03 Cardiac signal from image data analyzed - pass 2 20250429T120057 63.74 4.57 Cardiac signal from image data resampled and saved - pass 2 20250429T120057 63.86 0.12 Phase waveform generated - pass 2 20250429T120057 63.89 0.03 Slice phases determined for all timepoints - pass 2 20250429T120057 63.89 0.00 Output arrays allocated - pass 2 20250429T120057 63.89 0.00 Phase projection to image started - pass 2 20250429T120109 75.21 11.32 Phase projection to image completed - pass 2 20250429T120113 79.75 4.54 Phase projected data saved - pass 2 20250429T120114 80.42 0.67 Vessel masked phase projected data saved - pass 2 20250429T120114 80.66 0.24 Masks saved - pass 2 20250429T120114 80.77 0.11 Done [user@cn3335 ~]$ exit [user@biowulf ~]$