rapidtide 2.9.5__py3-none-any.whl → 3.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cloud/gmscalc-HCPYA +1 -1
- cloud/mount-and-run +2 -0
- cloud/rapidtide-HCPYA +3 -3
- rapidtide/Colortables.py +538 -38
- rapidtide/OrthoImageItem.py +1094 -51
- rapidtide/RapidtideDataset.py +1709 -114
- rapidtide/__init__.py +0 -8
- rapidtide/_version.py +4 -4
- rapidtide/calccoherence.py +242 -97
- rapidtide/calcnullsimfunc.py +240 -140
- rapidtide/calcsimfunc.py +314 -129
- rapidtide/correlate.py +1211 -389
- rapidtide/data/examples/src/testLD +56 -0
- rapidtide/data/examples/src/test_findmaxlag.py +2 -2
- rapidtide/data/examples/src/test_mlregressallt.py +32 -17
- rapidtide/data/examples/src/testalign +1 -1
- rapidtide/data/examples/src/testatlasaverage +35 -7
- rapidtide/data/examples/src/testboth +21 -0
- rapidtide/data/examples/src/testcifti +11 -0
- rapidtide/data/examples/src/testdelayvar +13 -0
- rapidtide/data/examples/src/testdlfilt +25 -0
- rapidtide/data/examples/src/testfft +35 -0
- rapidtide/data/examples/src/testfileorfloat +37 -0
- rapidtide/data/examples/src/testfmri +94 -27
- rapidtide/data/examples/src/testfuncs +3 -3
- rapidtide/data/examples/src/testglmfilt +8 -6
- rapidtide/data/examples/src/testhappy +84 -51
- rapidtide/data/examples/src/testinitdelay +19 -0
- rapidtide/data/examples/src/testmodels +33 -0
- rapidtide/data/examples/src/testnewrefine +26 -0
- rapidtide/data/examples/src/testnoiseamp +21 -0
- rapidtide/data/examples/src/testppgproc +17 -0
- rapidtide/data/examples/src/testrefineonly +22 -0
- rapidtide/data/examples/src/testretro +26 -13
- rapidtide/data/examples/src/testretrolagtcs +16 -0
- rapidtide/data/examples/src/testrolloff +11 -0
- rapidtide/data/examples/src/testsimdata +45 -28
- rapidtide/data/models/model_cnn_pytorch/loss.png +0 -0
- rapidtide/data/models/model_cnn_pytorch/loss.txt +1 -0
- rapidtide/data/models/model_cnn_pytorch/model.pth +0 -0
- rapidtide/data/models/model_cnn_pytorch/model_meta.json +68 -0
- rapidtide/data/models/model_cnn_pytorch_fulldata/loss.png +0 -0
- rapidtide/data/models/model_cnn_pytorch_fulldata/loss.txt +1 -0
- rapidtide/data/models/model_cnn_pytorch_fulldata/model.pth +0 -0
- rapidtide/data/models/model_cnn_pytorch_fulldata/model_meta.json +80 -0
- rapidtide/data/models/model_cnnbp_pytorch_fullldata/loss.png +0 -0
- rapidtide/data/models/model_cnnbp_pytorch_fullldata/loss.txt +1 -0
- rapidtide/data/models/model_cnnbp_pytorch_fullldata/model.pth +0 -0
- rapidtide/data/models/model_cnnbp_pytorch_fullldata/model_meta.json +138 -0
- rapidtide/data/models/model_cnnfft_pytorch_fulldata/loss.png +0 -0
- rapidtide/data/models/model_cnnfft_pytorch_fulldata/loss.txt +1 -0
- rapidtide/data/models/model_cnnfft_pytorch_fulldata/model.pth +0 -0
- rapidtide/data/models/model_cnnfft_pytorch_fulldata/model_meta.json +128 -0
- rapidtide/data/models/model_ppgattention_pytorch_w128_fulldata/loss.png +0 -0
- rapidtide/data/models/model_ppgattention_pytorch_w128_fulldata/loss.txt +1 -0
- rapidtide/data/models/model_ppgattention_pytorch_w128_fulldata/model.pth +0 -0
- rapidtide/data/models/model_ppgattention_pytorch_w128_fulldata/model_meta.json +49 -0
- rapidtide/data/models/model_revised_tf2/model.keras +0 -0
- rapidtide/data/models/{model_serdar → model_revised_tf2}/model_meta.json +1 -1
- rapidtide/data/models/model_serdar2_tf2/model.keras +0 -0
- rapidtide/data/models/{model_serdar2 → model_serdar2_tf2}/model_meta.json +1 -1
- rapidtide/data/models/model_serdar_tf2/model.keras +0 -0
- rapidtide/data/models/{model_revised → model_serdar_tf2}/model_meta.json +1 -1
- rapidtide/data/reference/HCP1200v2_MTT_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_binmask_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_csf_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_gray_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_graylaghist.json +7 -0
- rapidtide/data/reference/HCP1200v2_graylaghist.tsv.gz +0 -0
- rapidtide/data/reference/HCP1200v2_laghist.json +7 -0
- rapidtide/data/reference/HCP1200v2_laghist.tsv.gz +0 -0
- rapidtide/data/reference/HCP1200v2_mask_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_maxcorr_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_maxtime_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_maxwidth_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_negmask_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_timepercentile_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_white_2mm.nii.gz +0 -0
- rapidtide/data/reference/HCP1200v2_whitelaghist.json +7 -0
- rapidtide/data/reference/HCP1200v2_whitelaghist.tsv.gz +0 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1-seg2.xml +131 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1-seg2_regions.txt +60 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1-seg2_space-MNI152NLin6Asym_2mm.nii.gz +0 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1_space-MNI152NLin2009cAsym_2mm.nii.gz +0 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1_space-MNI152NLin2009cAsym_2mm_mask.nii.gz +0 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL1_space-MNI152NLin6Asym_2mm_mask.nii.gz +0 -0
- rapidtide/data/reference/JHU-ArterialTerritoriesNoVent-LVL2_space-MNI152NLin6Asym_2mm_mask.nii.gz +0 -0
- rapidtide/data/reference/MNI152_T1_1mm_Brain_FAST_seg.nii.gz +0 -0
- rapidtide/data/reference/MNI152_T1_1mm_Brain_Mask.nii.gz +0 -0
- rapidtide/data/reference/MNI152_T1_2mm_Brain_FAST_seg.nii.gz +0 -0
- rapidtide/data/reference/MNI152_T1_2mm_Brain_Mask.nii.gz +0 -0
- rapidtide/decorators.py +91 -0
- rapidtide/dlfilter.py +2553 -414
- rapidtide/dlfiltertorch.py +5201 -0
- rapidtide/externaltools.py +328 -13
- rapidtide/fMRIData_class.py +178 -0
- rapidtide/ffttools.py +168 -0
- rapidtide/filter.py +2704 -1462
- rapidtide/fit.py +2361 -579
- rapidtide/genericmultiproc.py +197 -0
- rapidtide/happy_supportfuncs.py +3255 -548
- rapidtide/helper_classes.py +590 -1181
- rapidtide/io.py +2569 -468
- rapidtide/linfitfiltpass.py +784 -0
- rapidtide/makelaggedtcs.py +267 -97
- rapidtide/maskutil.py +555 -25
- rapidtide/miscmath.py +867 -137
- rapidtide/multiproc.py +217 -44
- rapidtide/patchmatch.py +752 -0
- rapidtide/peakeval.py +32 -32
- rapidtide/ppgproc.py +2205 -0
- rapidtide/qualitycheck.py +353 -40
- rapidtide/refinedelay.py +854 -0
- rapidtide/refineregressor.py +939 -0
- rapidtide/resample.py +725 -204
- rapidtide/scripts/__init__.py +1 -0
- rapidtide/scripts/{adjustoffset → adjustoffset.py} +7 -2
- rapidtide/scripts/{aligntcs → aligntcs.py} +7 -2
- rapidtide/scripts/{applydlfilter → applydlfilter.py} +7 -2
- rapidtide/scripts/applyppgproc.py +28 -0
- rapidtide/scripts/{atlasaverage → atlasaverage.py} +7 -2
- rapidtide/scripts/{atlastool → atlastool.py} +7 -2
- rapidtide/scripts/{calcicc → calcicc.py} +7 -2
- rapidtide/scripts/{calctexticc → calctexticc.py} +7 -2
- rapidtide/scripts/{calcttest → calcttest.py} +7 -2
- rapidtide/scripts/{ccorrica → ccorrica.py} +7 -2
- rapidtide/scripts/delayvar.py +28 -0
- rapidtide/scripts/{diffrois → diffrois.py} +7 -2
- rapidtide/scripts/{endtidalproc → endtidalproc.py} +7 -2
- rapidtide/scripts/{fdica → fdica.py} +7 -2
- rapidtide/scripts/{filtnifti → filtnifti.py} +7 -2
- rapidtide/scripts/{filttc → filttc.py} +7 -2
- rapidtide/scripts/{fingerprint → fingerprint.py} +20 -16
- rapidtide/scripts/{fixtr → fixtr.py} +7 -2
- rapidtide/scripts/{gmscalc → gmscalc.py} +7 -2
- rapidtide/scripts/{happy → happy.py} +7 -2
- rapidtide/scripts/{happy2std → happy2std.py} +7 -2
- rapidtide/scripts/{happywarp → happywarp.py} +8 -4
- rapidtide/scripts/{histnifti → histnifti.py} +7 -2
- rapidtide/scripts/{histtc → histtc.py} +7 -2
- rapidtide/scripts/{glmfilt → linfitfilt.py} +7 -4
- rapidtide/scripts/{localflow → localflow.py} +7 -2
- rapidtide/scripts/{mergequality → mergequality.py} +7 -2
- rapidtide/scripts/{pairproc → pairproc.py} +7 -2
- rapidtide/scripts/{pairwisemergenifti → pairwisemergenifti.py} +7 -2
- rapidtide/scripts/{physiofreq → physiofreq.py} +7 -2
- rapidtide/scripts/{pixelcomp → pixelcomp.py} +7 -2
- rapidtide/scripts/{plethquality → plethquality.py} +7 -2
- rapidtide/scripts/{polyfitim → polyfitim.py} +7 -2
- rapidtide/scripts/{proj2flow → proj2flow.py} +7 -2
- rapidtide/scripts/{rankimage → rankimage.py} +7 -2
- rapidtide/scripts/{rapidtide → rapidtide.py} +7 -2
- rapidtide/scripts/{rapidtide2std → rapidtide2std.py} +7 -2
- rapidtide/scripts/{resamplenifti → resamplenifti.py} +7 -2
- rapidtide/scripts/{resampletc → resampletc.py} +7 -2
- rapidtide/scripts/retrolagtcs.py +28 -0
- rapidtide/scripts/retroregress.py +28 -0
- rapidtide/scripts/{roisummarize → roisummarize.py} +7 -2
- rapidtide/scripts/{runqualitycheck → runqualitycheck.py} +7 -2
- rapidtide/scripts/{showarbcorr → showarbcorr.py} +7 -2
- rapidtide/scripts/{showhist → showhist.py} +7 -2
- rapidtide/scripts/{showstxcorr → showstxcorr.py} +7 -2
- rapidtide/scripts/{showtc → showtc.py} +7 -2
- rapidtide/scripts/{showxcorr_legacy → showxcorr_legacy.py} +8 -8
- rapidtide/scripts/{showxcorrx → showxcorrx.py} +7 -2
- rapidtide/scripts/{showxy → showxy.py} +7 -2
- rapidtide/scripts/{simdata → simdata.py} +7 -2
- rapidtide/scripts/{spatialdecomp → spatialdecomp.py} +7 -2
- rapidtide/scripts/{spatialfit → spatialfit.py} +7 -2
- rapidtide/scripts/{spatialmi → spatialmi.py} +7 -2
- rapidtide/scripts/{spectrogram → spectrogram.py} +7 -2
- rapidtide/scripts/stupidramtricks.py +238 -0
- rapidtide/scripts/{synthASL → synthASL.py} +7 -2
- rapidtide/scripts/{tcfrom2col → tcfrom2col.py} +7 -2
- rapidtide/scripts/{tcfrom3col → tcfrom3col.py} +7 -2
- rapidtide/scripts/{temporaldecomp → temporaldecomp.py} +7 -2
- rapidtide/scripts/{testhrv → testhrv.py} +1 -1
- rapidtide/scripts/{threeD → threeD.py} +7 -2
- rapidtide/scripts/{tidepool → tidepool.py} +7 -2
- rapidtide/scripts/{variabilityizer → variabilityizer.py} +7 -2
- rapidtide/simFuncClasses.py +2113 -0
- rapidtide/simfuncfit.py +312 -108
- rapidtide/stats.py +579 -247
- rapidtide/tests/.coveragerc +27 -6
- rapidtide-2.9.5.data/scripts/fdica → rapidtide/tests/cleanposttest +4 -6
- rapidtide/tests/happycomp +9 -0
- rapidtide/tests/resethappytargets +1 -1
- rapidtide/tests/resetrapidtidetargets +1 -1
- rapidtide/tests/resettargets +1 -1
- rapidtide/tests/runlocaltest +3 -3
- rapidtide/tests/showkernels +1 -1
- rapidtide/tests/test_aliasedcorrelate.py +4 -4
- rapidtide/tests/test_aligntcs.py +1 -1
- rapidtide/tests/test_calcicc.py +1 -1
- rapidtide/tests/test_cleanregressor.py +184 -0
- rapidtide/tests/test_congrid.py +70 -81
- rapidtide/tests/test_correlate.py +1 -1
- rapidtide/tests/test_corrpass.py +4 -4
- rapidtide/tests/test_delayestimation.py +54 -59
- rapidtide/tests/test_dlfiltertorch.py +437 -0
- rapidtide/tests/test_doresample.py +2 -2
- rapidtide/tests/test_externaltools.py +69 -0
- rapidtide/tests/test_fastresampler.py +9 -5
- rapidtide/tests/test_filter.py +96 -57
- rapidtide/tests/test_findmaxlag.py +50 -19
- rapidtide/tests/test_fullrunhappy_v1.py +15 -10
- rapidtide/tests/test_fullrunhappy_v2.py +19 -13
- rapidtide/tests/test_fullrunhappy_v3.py +28 -13
- rapidtide/tests/test_fullrunhappy_v4.py +30 -11
- rapidtide/tests/test_fullrunhappy_v5.py +62 -0
- rapidtide/tests/test_fullrunrapidtide_v1.py +61 -7
- rapidtide/tests/test_fullrunrapidtide_v2.py +27 -15
- rapidtide/tests/test_fullrunrapidtide_v3.py +28 -8
- rapidtide/tests/test_fullrunrapidtide_v4.py +16 -8
- rapidtide/tests/test_fullrunrapidtide_v5.py +15 -6
- rapidtide/tests/test_fullrunrapidtide_v6.py +142 -0
- rapidtide/tests/test_fullrunrapidtide_v7.py +114 -0
- rapidtide/tests/test_fullrunrapidtide_v8.py +66 -0
- rapidtide/tests/test_getparsers.py +158 -0
- rapidtide/tests/test_io.py +59 -18
- rapidtide/tests/{test_glmpass.py → test_linfitfiltpass.py} +10 -10
- rapidtide/tests/test_mi.py +1 -1
- rapidtide/tests/test_miscmath.py +1 -1
- rapidtide/tests/test_motionregress.py +5 -5
- rapidtide/tests/test_nullcorr.py +6 -9
- rapidtide/tests/test_padvec.py +216 -0
- rapidtide/tests/test_parserfuncs.py +101 -0
- rapidtide/tests/test_phaseanalysis.py +1 -1
- rapidtide/tests/test_rapidtideparser.py +59 -53
- rapidtide/tests/test_refinedelay.py +296 -0
- rapidtide/tests/test_runmisc.py +5 -5
- rapidtide/tests/test_sharedmem.py +60 -0
- rapidtide/tests/test_simroundtrip.py +132 -0
- rapidtide/tests/test_simulate.py +1 -1
- rapidtide/tests/test_stcorrelate.py +4 -2
- rapidtide/tests/test_timeshift.py +2 -2
- rapidtide/tests/test_valtoindex.py +1 -1
- rapidtide/tests/test_zRapidtideDataset.py +5 -3
- rapidtide/tests/utils.py +10 -9
- rapidtide/tidepoolTemplate.py +88 -70
- rapidtide/tidepoolTemplate.ui +60 -46
- rapidtide/tidepoolTemplate_alt.py +88 -53
- rapidtide/tidepoolTemplate_alt.ui +62 -52
- rapidtide/tidepoolTemplate_alt_qt6.py +921 -0
- rapidtide/tidepoolTemplate_big.py +1125 -0
- rapidtide/tidepoolTemplate_big.ui +2386 -0
- rapidtide/tidepoolTemplate_big_qt6.py +1129 -0
- rapidtide/tidepoolTemplate_qt6.py +793 -0
- rapidtide/util.py +1389 -148
- rapidtide/voxelData.py +1048 -0
- rapidtide/wiener.py +138 -25
- rapidtide/wiener2.py +114 -8
- rapidtide/workflows/adjustoffset.py +107 -5
- rapidtide/workflows/aligntcs.py +86 -3
- rapidtide/workflows/applydlfilter.py +231 -89
- rapidtide/workflows/applyppgproc.py +540 -0
- rapidtide/workflows/atlasaverage.py +309 -48
- rapidtide/workflows/atlastool.py +130 -9
- rapidtide/workflows/calcSimFuncMap.py +490 -0
- rapidtide/workflows/calctexticc.py +202 -10
- rapidtide/workflows/ccorrica.py +123 -15
- rapidtide/workflows/cleanregressor.py +415 -0
- rapidtide/workflows/delayvar.py +1268 -0
- rapidtide/workflows/diffrois.py +84 -6
- rapidtide/workflows/endtidalproc.py +149 -9
- rapidtide/workflows/fdica.py +197 -17
- rapidtide/workflows/filtnifti.py +71 -4
- rapidtide/workflows/filttc.py +76 -5
- rapidtide/workflows/fitSimFuncMap.py +578 -0
- rapidtide/workflows/fixtr.py +74 -4
- rapidtide/workflows/gmscalc.py +116 -6
- rapidtide/workflows/happy.py +1242 -480
- rapidtide/workflows/happy2std.py +145 -13
- rapidtide/workflows/happy_parser.py +277 -59
- rapidtide/workflows/histnifti.py +120 -4
- rapidtide/workflows/histtc.py +85 -4
- rapidtide/workflows/{glmfilt.py → linfitfilt.py} +128 -14
- rapidtide/workflows/localflow.py +329 -29
- rapidtide/workflows/mergequality.py +80 -4
- rapidtide/workflows/niftidecomp.py +323 -19
- rapidtide/workflows/niftistats.py +178 -8
- rapidtide/workflows/pairproc.py +99 -5
- rapidtide/workflows/pairwisemergenifti.py +86 -3
- rapidtide/workflows/parser_funcs.py +1488 -56
- rapidtide/workflows/physiofreq.py +139 -12
- rapidtide/workflows/pixelcomp.py +211 -9
- rapidtide/workflows/plethquality.py +105 -23
- rapidtide/workflows/polyfitim.py +159 -19
- rapidtide/workflows/proj2flow.py +76 -3
- rapidtide/workflows/rankimage.py +115 -8
- rapidtide/workflows/rapidtide.py +1833 -1919
- rapidtide/workflows/rapidtide2std.py +101 -3
- rapidtide/workflows/rapidtide_parser.py +607 -372
- rapidtide/workflows/refineDelayMap.py +249 -0
- rapidtide/workflows/refineRegressor.py +1215 -0
- rapidtide/workflows/regressfrommaps.py +308 -0
- rapidtide/workflows/resamplenifti.py +86 -4
- rapidtide/workflows/resampletc.py +92 -4
- rapidtide/workflows/retrolagtcs.py +442 -0
- rapidtide/workflows/retroregress.py +1501 -0
- rapidtide/workflows/roisummarize.py +176 -7
- rapidtide/workflows/runqualitycheck.py +72 -7
- rapidtide/workflows/showarbcorr.py +172 -16
- rapidtide/workflows/showhist.py +87 -3
- rapidtide/workflows/showstxcorr.py +161 -4
- rapidtide/workflows/showtc.py +172 -10
- rapidtide/workflows/showxcorrx.py +250 -62
- rapidtide/workflows/showxy.py +186 -16
- rapidtide/workflows/simdata.py +418 -112
- rapidtide/workflows/spatialfit.py +83 -8
- rapidtide/workflows/spatialmi.py +252 -29
- rapidtide/workflows/spectrogram.py +306 -33
- rapidtide/workflows/synthASL.py +157 -6
- rapidtide/workflows/tcfrom2col.py +77 -3
- rapidtide/workflows/tcfrom3col.py +75 -3
- rapidtide/workflows/tidepool.py +3829 -666
- rapidtide/workflows/utils.py +45 -19
- rapidtide/workflows/utils_doc.py +293 -0
- rapidtide/workflows/variabilityizer.py +118 -5
- {rapidtide-2.9.5.dist-info → rapidtide-3.1.3.dist-info}/METADATA +30 -223
- rapidtide-3.1.3.dist-info/RECORD +393 -0
- {rapidtide-2.9.5.dist-info → rapidtide-3.1.3.dist-info}/WHEEL +1 -1
- rapidtide-3.1.3.dist-info/entry_points.txt +65 -0
- rapidtide-3.1.3.dist-info/top_level.txt +2 -0
- rapidtide/calcandfitcorrpairs.py +0 -262
- rapidtide/data/examples/src/testoutputsize +0 -45
- rapidtide/data/models/model_revised/model.h5 +0 -0
- rapidtide/data/models/model_serdar/model.h5 +0 -0
- rapidtide/data/models/model_serdar2/model.h5 +0 -0
- rapidtide/data/reference/ASPECTS_nlin_asym_09c_2mm.nii.gz +0 -0
- rapidtide/data/reference/ASPECTS_nlin_asym_09c_2mm_mask.nii.gz +0 -0
- rapidtide/data/reference/ATTbasedFlowTerritories_split_nlin_asym_09c_2mm.nii.gz +0 -0
- rapidtide/data/reference/ATTbasedFlowTerritories_split_nlin_asym_09c_2mm_mask.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_binmask_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_lag_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_mask_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_negmask_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_sigma_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/data/reference/HCP1200_strength_2mm_2009c_asym.nii.gz +0 -0
- rapidtide/glmpass.py +0 -434
- rapidtide/refine_factored.py +0 -641
- rapidtide/scripts/retroglm +0 -23
- rapidtide/workflows/glmfrommaps.py +0 -202
- rapidtide/workflows/retroglm.py +0 -643
- rapidtide-2.9.5.data/scripts/adjustoffset +0 -23
- rapidtide-2.9.5.data/scripts/aligntcs +0 -23
- rapidtide-2.9.5.data/scripts/applydlfilter +0 -23
- rapidtide-2.9.5.data/scripts/atlasaverage +0 -23
- rapidtide-2.9.5.data/scripts/atlastool +0 -23
- rapidtide-2.9.5.data/scripts/calcicc +0 -22
- rapidtide-2.9.5.data/scripts/calctexticc +0 -23
- rapidtide-2.9.5.data/scripts/calcttest +0 -22
- rapidtide-2.9.5.data/scripts/ccorrica +0 -23
- rapidtide-2.9.5.data/scripts/diffrois +0 -23
- rapidtide-2.9.5.data/scripts/endtidalproc +0 -23
- rapidtide-2.9.5.data/scripts/filtnifti +0 -23
- rapidtide-2.9.5.data/scripts/filttc +0 -23
- rapidtide-2.9.5.data/scripts/fingerprint +0 -593
- rapidtide-2.9.5.data/scripts/fixtr +0 -23
- rapidtide-2.9.5.data/scripts/glmfilt +0 -24
- rapidtide-2.9.5.data/scripts/gmscalc +0 -22
- rapidtide-2.9.5.data/scripts/happy +0 -25
- rapidtide-2.9.5.data/scripts/happy2std +0 -23
- rapidtide-2.9.5.data/scripts/happywarp +0 -350
- rapidtide-2.9.5.data/scripts/histnifti +0 -23
- rapidtide-2.9.5.data/scripts/histtc +0 -23
- rapidtide-2.9.5.data/scripts/localflow +0 -23
- rapidtide-2.9.5.data/scripts/mergequality +0 -23
- rapidtide-2.9.5.data/scripts/pairproc +0 -23
- rapidtide-2.9.5.data/scripts/pairwisemergenifti +0 -23
- rapidtide-2.9.5.data/scripts/physiofreq +0 -23
- rapidtide-2.9.5.data/scripts/pixelcomp +0 -23
- rapidtide-2.9.5.data/scripts/plethquality +0 -23
- rapidtide-2.9.5.data/scripts/polyfitim +0 -23
- rapidtide-2.9.5.data/scripts/proj2flow +0 -23
- rapidtide-2.9.5.data/scripts/rankimage +0 -23
- rapidtide-2.9.5.data/scripts/rapidtide +0 -23
- rapidtide-2.9.5.data/scripts/rapidtide2std +0 -23
- rapidtide-2.9.5.data/scripts/resamplenifti +0 -23
- rapidtide-2.9.5.data/scripts/resampletc +0 -23
- rapidtide-2.9.5.data/scripts/retroglm +0 -23
- rapidtide-2.9.5.data/scripts/roisummarize +0 -23
- rapidtide-2.9.5.data/scripts/runqualitycheck +0 -23
- rapidtide-2.9.5.data/scripts/showarbcorr +0 -23
- rapidtide-2.9.5.data/scripts/showhist +0 -23
- rapidtide-2.9.5.data/scripts/showstxcorr +0 -23
- rapidtide-2.9.5.data/scripts/showtc +0 -23
- rapidtide-2.9.5.data/scripts/showxcorr_legacy +0 -536
- rapidtide-2.9.5.data/scripts/showxcorrx +0 -23
- rapidtide-2.9.5.data/scripts/showxy +0 -23
- rapidtide-2.9.5.data/scripts/simdata +0 -23
- rapidtide-2.9.5.data/scripts/spatialdecomp +0 -23
- rapidtide-2.9.5.data/scripts/spatialfit +0 -23
- rapidtide-2.9.5.data/scripts/spatialmi +0 -23
- rapidtide-2.9.5.data/scripts/spectrogram +0 -23
- rapidtide-2.9.5.data/scripts/synthASL +0 -23
- rapidtide-2.9.5.data/scripts/tcfrom2col +0 -23
- rapidtide-2.9.5.data/scripts/tcfrom3col +0 -23
- rapidtide-2.9.5.data/scripts/temporaldecomp +0 -23
- rapidtide-2.9.5.data/scripts/threeD +0 -236
- rapidtide-2.9.5.data/scripts/tidepool +0 -23
- rapidtide-2.9.5.data/scripts/variabilityizer +0 -23
- rapidtide-2.9.5.dist-info/RECORD +0 -357
- rapidtide-2.9.5.dist-info/top_level.txt +0 -86
- {rapidtide-2.9.5.dist-info → rapidtide-3.1.3.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
#
|
|
4
|
-
# Copyright 2016-
|
|
4
|
+
# Copyright 2016-2025 Blaise Frederick
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
|
@@ -21,9 +21,11 @@ import logging
|
|
|
21
21
|
import os
|
|
22
22
|
import sys
|
|
23
23
|
from argparse import Namespace
|
|
24
|
+
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
|
|
24
25
|
|
|
25
26
|
import nibabel as nib
|
|
26
27
|
import numpy as np
|
|
28
|
+
from numpy.typing import NDArray
|
|
27
29
|
|
|
28
30
|
import rapidtide.io as tide_io
|
|
29
31
|
import rapidtide.util as tide_util
|
|
@@ -44,7 +46,7 @@ LGR = logging.getLogger(__name__)
|
|
|
44
46
|
DEFAULT_SPATIALFILT = -1
|
|
45
47
|
DEFAULT_HISTLEN = 101
|
|
46
48
|
DEFAULT_DETREND_ORDER = 3
|
|
47
|
-
|
|
49
|
+
DEFAULT_INITREGRESSOR_PCACOMPONENTS = 0.8
|
|
48
50
|
DEFAULT_CORRMASK_THRESHPCT = 1.0
|
|
49
51
|
DEFAULT_MUTUALINFO_SMOOTHINGTIME = 3.0
|
|
50
52
|
DEFAULT_LAGMIN = -30.0
|
|
@@ -54,8 +56,8 @@ DEFAULT_SIGMAMIN = 0.0
|
|
|
54
56
|
DEFAULT_DESPECKLE_PASSES = 4
|
|
55
57
|
DEFAULT_DESPECKLE_THRESH = 5.0
|
|
56
58
|
DEFAULT_PASSES = 3
|
|
57
|
-
DEFAULT_LAGMIN_THRESH = 0.
|
|
58
|
-
DEFAULT_LAGMAX_THRESH =
|
|
59
|
+
DEFAULT_LAGMIN_THRESH = 0.25
|
|
60
|
+
DEFAULT_LAGMAX_THRESH = 3.0
|
|
59
61
|
DEFAULT_AMPTHRESH = 0.3
|
|
60
62
|
DEFAULT_PICKLEFT_THRESH = 0.33
|
|
61
63
|
DEFAULT_SIGMATHRESH = 100.0
|
|
@@ -63,16 +65,15 @@ DEFAULT_MAXPASSES = 15
|
|
|
63
65
|
DEFAULT_REFINE_TYPE = "pca"
|
|
64
66
|
DEFAULT_INTERPTYPE = "univariate"
|
|
65
67
|
DEFAULT_WINDOW_TYPE = "hamming"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
DEFAULT_CORRWEIGHTING = "regressor"
|
|
68
|
+
DEFAULT_INITREGRESSOR_METHOD = "sum"
|
|
69
|
+
DEFAULT_CORRWEIGHTING = "phat"
|
|
69
70
|
DEFAULT_CORRTYPE = "linear"
|
|
70
71
|
DEFAULT_SIMILARITYMETRIC = "correlation"
|
|
71
72
|
DEFAULT_PEAKFIT_TYPE = "gauss"
|
|
72
73
|
DEFAULT_REFINE_PRENORM = "var"
|
|
73
74
|
DEFAULT_REFINE_WEIGHTING = "None"
|
|
74
75
|
DEFAULT_REFINE_PCACOMPONENTS = 0.8
|
|
75
|
-
|
|
76
|
+
DEFAULT_REGRESSIONFILTDERIVS = 0
|
|
76
77
|
|
|
77
78
|
DEFAULT_DENOISING_LAGMIN = -10.0
|
|
78
79
|
DEFAULT_DENOISING_LAGMAX = 10.0
|
|
@@ -85,6 +86,7 @@ DEFAULT_DELAYMAPPING_LAGMIN = -10.0
|
|
|
85
86
|
DEFAULT_DELAYMAPPING_LAGMAX = 30.0
|
|
86
87
|
DEFAULT_DELAYMAPPING_PASSES = 3
|
|
87
88
|
DEFAULT_DELAYMAPPING_DESPECKLE_PASSES = 4
|
|
89
|
+
DEFAULT_DELAYMAPPING_SPATIALFILT = 2.5
|
|
88
90
|
|
|
89
91
|
DEFAULT_CVRMAPPING_LAGMIN = -5.0
|
|
90
92
|
DEFAULT_CVRMAPPING_LAGMAX = 20.0
|
|
@@ -94,10 +96,51 @@ DEFAULT_CVRMAPPING_DESPECKLE_PASSES = 4
|
|
|
94
96
|
|
|
95
97
|
DEFAULT_OUTPUTLEVEL = "normal"
|
|
96
98
|
|
|
99
|
+
DEFAULT_SLFONOISEAMP_WINDOWSIZE = 40.0
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
DEFAULT_COARSEDELAY_TYPE = "simfunc"
|
|
102
|
+
DEFAULT_RIPTIDESTEP = 2.0
|
|
103
|
+
|
|
104
|
+
DEFAULT_PATCHTHRESH = 3.0
|
|
105
|
+
DEFAULT_REFINEDELAYMINDELAY = -5.0
|
|
106
|
+
DEFAULT_REFINEDELAYMAXDELAY = 5.0
|
|
107
|
+
DEFAULT_REFINEDELAYNUMPOINTS = 501
|
|
108
|
+
DEFAULT_DELAYOFFSETSPATIALFILT = -1
|
|
109
|
+
|
|
110
|
+
DEFAULT_PATCHMINSIZE = 10
|
|
111
|
+
DEFAULT_PATCHFWHM = 5
|
|
112
|
+
|
|
113
|
+
DEFAULT_PREWHITEN_LAGS = -1
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def _get_parser() -> Any:
|
|
99
117
|
"""
|
|
100
|
-
|
|
118
|
+
Set up the argument parser for rapidtide command-line interface.
|
|
119
|
+
|
|
120
|
+
This function configures all available command-line arguments for the rapidtide
|
|
121
|
+
tool, organizing them into logical groups for easy reference and use.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
argparse.ArgumentParser
|
|
126
|
+
Configured argument parser with all rapidtide options added
|
|
127
|
+
|
|
128
|
+
Notes
|
|
129
|
+
-----
|
|
130
|
+
The parser includes several groups of options:
|
|
131
|
+
- Input/Output options
|
|
132
|
+
- Processing options
|
|
133
|
+
- Performance options
|
|
134
|
+
- Miscellaneous options
|
|
135
|
+
- Experimental options (not fully tested)
|
|
136
|
+
- Deprecated options (will be removed in future versions)
|
|
137
|
+
- Debugging options (for development and troubleshooting)
|
|
138
|
+
|
|
139
|
+
Examples
|
|
140
|
+
--------
|
|
141
|
+
>>> parser = setup_parser()
|
|
142
|
+
>>> args = parser.parse_args()
|
|
143
|
+
>>> print(args.version)
|
|
101
144
|
"""
|
|
102
145
|
parser = argparse.ArgumentParser(
|
|
103
146
|
prog="rapidtide",
|
|
@@ -140,7 +183,7 @@ def _get_parser():
|
|
|
140
183
|
f"sets searchrange=({DEFAULT_DENOISING_LAGMIN}, {DEFAULT_DENOISING_LAGMAX}), "
|
|
141
184
|
f"passes={DEFAULT_DENOISING_PASSES}, despeckle_passes={DEFAULT_DENOISING_DESPECKLE_PASSES}, "
|
|
142
185
|
f"refineoffset=True, peakfittype={DEFAULT_DENOISING_PEAKFITTYPE}, "
|
|
143
|
-
f"gausssigma={DEFAULT_DENOISING_SPATIALFILT}, nofitfilt=True,
|
|
186
|
+
f"gausssigma={DEFAULT_DENOISING_SPATIALFILT}, nofitfilt=True, dolinfitfilt=True. "
|
|
144
187
|
"Any of these options can be overridden with the appropriate "
|
|
145
188
|
"additional arguments."
|
|
146
189
|
),
|
|
@@ -154,8 +197,9 @@ def _get_parser():
|
|
|
154
197
|
"Preset for delay mapping analysis - this is a macro that "
|
|
155
198
|
f"sets searchrange=({DEFAULT_DELAYMAPPING_LAGMIN}, {DEFAULT_DELAYMAPPING_LAGMAX}), "
|
|
156
199
|
f"passes={DEFAULT_DELAYMAPPING_PASSES}, despeckle_passes={DEFAULT_DELAYMAPPING_DESPECKLE_PASSES}, "
|
|
157
|
-
"
|
|
158
|
-
"
|
|
200
|
+
f"gausssigma={DEFAULT_DELAYMAPPING_SPATIALFILT}, "
|
|
201
|
+
"refineoffset=True, refinedelay=True, outputlevel='normal', "
|
|
202
|
+
"dolinfitfilt=False. "
|
|
159
203
|
"Any of these options can be overridden with the appropriate "
|
|
160
204
|
"additional arguments."
|
|
161
205
|
),
|
|
@@ -172,7 +216,7 @@ def _get_parser():
|
|
|
172
216
|
f"passes=1, despeckle_passes={DEFAULT_CVRMAPPING_DESPECKLE_PASSES}, "
|
|
173
217
|
f"searchrange=({DEFAULT_CVRMAPPING_LAGMIN}, {DEFAULT_CVRMAPPING_LAGMAX}), "
|
|
174
218
|
f"filterfreqs=({DEFAULT_CVRMAPPING_FILTER_LOWERPASS}, {DEFAULT_CVRMAPPING_FILTER_UPPERPASS}), "
|
|
175
|
-
"and calculates a voxelwise
|
|
219
|
+
"and calculates a voxelwise regression fit using the optimally delayed "
|
|
176
220
|
"input regressor and the percent normalized, demeaned BOLD data as inputs. This map is output as "
|
|
177
221
|
"(XXX_desc-CVR_map.nii.gz). If no input regressor is supplied, this will generate an error. "
|
|
178
222
|
"These options can be overridden with the appropriate additional arguments."
|
|
@@ -181,12 +225,12 @@ def _get_parser():
|
|
|
181
225
|
)
|
|
182
226
|
analysis_type.add_argument(
|
|
183
227
|
"--globalpreselect",
|
|
184
|
-
dest="
|
|
228
|
+
dest="initregressorpreselect",
|
|
185
229
|
action="store_true",
|
|
186
230
|
help=(
|
|
187
231
|
"Treat this run as an initial pass to locate good candidate voxels for global mean "
|
|
188
232
|
"regressor generation. This sets: passes=1, despecklepasses=0, "
|
|
189
|
-
"refinedespeckle=False, outputlevel='normal',
|
|
233
|
+
"refinedespeckle=False, outputlevel='normal', dolinfitfilt=False, saveintermediatemaps=False."
|
|
190
234
|
),
|
|
191
235
|
default=False,
|
|
192
236
|
)
|
|
@@ -219,7 +263,7 @@ def _get_parser():
|
|
|
219
263
|
action="store_true",
|
|
220
264
|
help=(
|
|
221
265
|
"This is a NIRS analysis - this is a macro that "
|
|
222
|
-
"sets nothresh, refineprenorm=var, ampthresh=0.7, and "
|
|
266
|
+
"sets nothresh, dataiszeromean=True, refineprenorm=var, ampthresh=0.7, and "
|
|
223
267
|
"lagminthresh=0.1. "
|
|
224
268
|
),
|
|
225
269
|
default=False,
|
|
@@ -247,7 +291,7 @@ def _get_parser():
|
|
|
247
291
|
"2) decide which voxels in which to calculate delays, "
|
|
248
292
|
"3) refine the regressor at the end of each pass, 4) determine the zero time offset value, and 5) process "
|
|
249
293
|
"to remove sLFO signal. "
|
|
250
|
-
"Setting --
|
|
294
|
+
"Setting --initregressorinclude, --corrmaskinclude, --refineinclude or --offsetinclude explicitly will "
|
|
251
295
|
"override this for the given include mask."
|
|
252
296
|
),
|
|
253
297
|
default=None,
|
|
@@ -260,9 +304,8 @@ def _get_parser():
|
|
|
260
304
|
"This specifies a gray matter mask registered to the input functional data. "
|
|
261
305
|
"If VALSPEC is given, only voxels in the mask with integral values listed in VALSPEC are used, otherwise "
|
|
262
306
|
"voxels with value > 0.1 are used. If this option is set, "
|
|
263
|
-
"rapidtide will use voxels in the gray matter mask to
|
|
264
|
-
"
|
|
265
|
-
"Setting --globalmeaninclude, --refineinclude, or --offsetinclude explicitly will override this for "
|
|
307
|
+
"rapidtide will use voxels in the gray matter mask to calculate the initial global mean regressor. "
|
|
308
|
+
"Setting --initregressorinclude explicitly will override this for "
|
|
266
309
|
"the given include mask."
|
|
267
310
|
),
|
|
268
311
|
default=None,
|
|
@@ -275,8 +318,21 @@ def _get_parser():
|
|
|
275
318
|
"This specifies a white matter mask registered to the input functional data. "
|
|
276
319
|
"If VALSPEC is given, only voxels in the mask with integral values listed in VALSPEC are used, otherwise "
|
|
277
320
|
"voxels with value > 0.1 are used. "
|
|
278
|
-
"This
|
|
279
|
-
"
|
|
321
|
+
"This will be used to calculate the white matter timecourse before running rapidtide, and after sLFO "
|
|
322
|
+
"filtering (if enabled)."
|
|
323
|
+
),
|
|
324
|
+
default=None,
|
|
325
|
+
)
|
|
326
|
+
anatomy.add_argument(
|
|
327
|
+
"--csfmask",
|
|
328
|
+
dest="csfincludespec",
|
|
329
|
+
metavar="MASK[:VALSPEC]",
|
|
330
|
+
help=(
|
|
331
|
+
"This specifies a CSF mask registered to the input functional data. "
|
|
332
|
+
"If VALSPEC is given, only voxels in the mask with integral values listed in VALSPEC are used, otherwise "
|
|
333
|
+
"voxels with value > 0.1 are used. "
|
|
334
|
+
"This will be used to calculate the CSF timecourse before running rapidtide, and after sLFO "
|
|
335
|
+
"filtering (if enabled)."
|
|
280
336
|
),
|
|
281
337
|
default=None,
|
|
282
338
|
)
|
|
@@ -289,7 +345,7 @@ def _get_parser():
|
|
|
289
345
|
dest="realtr",
|
|
290
346
|
action="store",
|
|
291
347
|
metavar="TSTEP",
|
|
292
|
-
type=lambda x: pf.is_float(parser, x),
|
|
348
|
+
type=lambda x: pf.is_float(parser, x, minval=0.0),
|
|
293
349
|
help=(
|
|
294
350
|
"Set the timestep of the data file to TSTEP. "
|
|
295
351
|
"This will override the TR in an "
|
|
@@ -361,6 +417,17 @@ def _get_parser():
|
|
|
361
417
|
),
|
|
362
418
|
default=False,
|
|
363
419
|
)
|
|
420
|
+
preproc.add_argument(
|
|
421
|
+
"--dataiszeromean",
|
|
422
|
+
dest="dataiszeromean",
|
|
423
|
+
action="store_true",
|
|
424
|
+
help=(
|
|
425
|
+
"Assume that the fMRI data is zero mean (this will be the case if you used AFNI for preprocessing). "
|
|
426
|
+
"This affects how masks are generated. Rapidtide will attempt to detect this, but set explicitly "
|
|
427
|
+
"if you know this is the case."
|
|
428
|
+
),
|
|
429
|
+
default=False,
|
|
430
|
+
)
|
|
364
431
|
|
|
365
432
|
# Add filter options
|
|
366
433
|
pf.addfilteropts(parser, filtertarget="data and regressors", details=True)
|
|
@@ -375,7 +442,7 @@ def _get_parser():
|
|
|
375
442
|
"--detrendorder",
|
|
376
443
|
dest="detrendorder",
|
|
377
444
|
action="store",
|
|
378
|
-
type=
|
|
445
|
+
type=lambda x: pf.is_int(parser, x, minval=0),
|
|
379
446
|
metavar="ORDER",
|
|
380
447
|
help=(f"Set order of trend removal (0 to disable). Default is {DEFAULT_DETREND_ORDER}."),
|
|
381
448
|
default=DEFAULT_DETREND_ORDER,
|
|
@@ -390,40 +457,45 @@ def _get_parser():
|
|
|
390
457
|
"Spatially filter fMRI data prior to analysis "
|
|
391
458
|
"using GAUSSSIGMA in mm. Set GAUSSSIGMA negative "
|
|
392
459
|
"to have rapidtide set it to half the mean voxel "
|
|
393
|
-
"dimension (a rule of thumb for a good value)."
|
|
460
|
+
"dimension (a rule of thumb for a good value). Set to 0 to disable."
|
|
394
461
|
),
|
|
395
462
|
default=DEFAULT_SPATIALFILT,
|
|
396
463
|
)
|
|
397
464
|
preproc.add_argument(
|
|
398
|
-
"--
|
|
399
|
-
dest="
|
|
465
|
+
"--premask",
|
|
466
|
+
dest="premask",
|
|
400
467
|
action="store_true",
|
|
401
468
|
help=(
|
|
402
|
-
"
|
|
403
|
-
"regressor. If no external regressor is specified, this "
|
|
404
|
-
"is enabled by default."
|
|
469
|
+
"Apply masking prior to spatial filtering to limit extracerebral sources (requires --brainmask)"
|
|
405
470
|
),
|
|
406
471
|
default=False,
|
|
407
472
|
)
|
|
408
473
|
preproc.add_argument(
|
|
409
|
-
"--
|
|
410
|
-
dest="
|
|
411
|
-
action="
|
|
412
|
-
|
|
413
|
-
|
|
474
|
+
"--premasktissueonly",
|
|
475
|
+
dest="premasktissueonly",
|
|
476
|
+
action="store_true",
|
|
477
|
+
help=(
|
|
478
|
+
"Apply more stringent masking prior to spatial filtering, removing CSF voxels (requires --graymattermask and --whitemattermask)."
|
|
479
|
+
),
|
|
480
|
+
default=False,
|
|
481
|
+
)
|
|
482
|
+
preproc.add_argument(
|
|
483
|
+
"--globalmean",
|
|
484
|
+
dest="useinitregressorref",
|
|
485
|
+
action="store_true",
|
|
414
486
|
help=(
|
|
415
|
-
"
|
|
416
|
-
"
|
|
417
|
-
|
|
487
|
+
"Generate a global mean regressor and use that as the reference "
|
|
488
|
+
"regressor. If no external regressor is specified, this "
|
|
489
|
+
"is enabled by default."
|
|
418
490
|
),
|
|
419
|
-
default=
|
|
491
|
+
default=False,
|
|
420
492
|
)
|
|
421
493
|
preproc.add_argument(
|
|
422
494
|
"--globalmeaninclude",
|
|
423
|
-
dest="
|
|
495
|
+
dest="initregressorincludespec",
|
|
424
496
|
metavar="MASK[:VALSPEC]",
|
|
425
497
|
help=(
|
|
426
|
-
"Only use voxels in mask file NAME for
|
|
498
|
+
"Only use voxels in mask file NAME for the initial regressor "
|
|
427
499
|
"generation (if VALSPEC is given, only voxels "
|
|
428
500
|
"with integral values listed in VALSPEC are used)."
|
|
429
501
|
),
|
|
@@ -431,10 +503,10 @@ def _get_parser():
|
|
|
431
503
|
)
|
|
432
504
|
preproc.add_argument(
|
|
433
505
|
"--globalmeanexclude",
|
|
434
|
-
dest="
|
|
506
|
+
dest="initregressorexcludespec",
|
|
435
507
|
metavar="MASK[:VALSPEC]",
|
|
436
508
|
help=(
|
|
437
|
-
"Do not use voxels in mask file NAME for
|
|
509
|
+
"Do not use voxels in mask file NAME for the initial regressor "
|
|
438
510
|
"generation (if VALSPEC is given, only voxels "
|
|
439
511
|
"with integral values listed in VALSPEC are excluded)."
|
|
440
512
|
),
|
|
@@ -452,10 +524,22 @@ def _get_parser():
|
|
|
452
524
|
default=None,
|
|
453
525
|
)
|
|
454
526
|
preproc.add_argument(
|
|
455
|
-
"--
|
|
527
|
+
"--motpowers",
|
|
528
|
+
dest="mot_power",
|
|
529
|
+
metavar="N",
|
|
530
|
+
type=lambda x: pf.is_int(parser, x, minval=1),
|
|
531
|
+
help=(
|
|
532
|
+
"Include powers of each motion regressor up to order N. Default is 1 (no expansion). "
|
|
533
|
+
),
|
|
534
|
+
default=1,
|
|
535
|
+
)
|
|
536
|
+
preproc.add_argument(
|
|
537
|
+
"--nomotderiv",
|
|
456
538
|
dest="mot_deriv",
|
|
457
539
|
action="store_false",
|
|
458
|
-
help=(
|
|
540
|
+
help=(
|
|
541
|
+
"Do not use derivatives in motion regression. Default is to use temporal derivatives."
|
|
542
|
+
),
|
|
459
543
|
default=True,
|
|
460
544
|
)
|
|
461
545
|
preproc.add_argument(
|
|
@@ -474,18 +558,18 @@ def _get_parser():
|
|
|
474
558
|
"--confoundpowers",
|
|
475
559
|
dest="confound_power",
|
|
476
560
|
metavar="N",
|
|
477
|
-
type=
|
|
561
|
+
type=lambda x: pf.is_int(parser, x, minval=1),
|
|
478
562
|
help=(
|
|
479
563
|
"Include powers of each confound regressor up to order N. Default is 1 (no expansion). "
|
|
480
564
|
),
|
|
481
565
|
default=1,
|
|
482
566
|
)
|
|
483
567
|
preproc.add_argument(
|
|
484
|
-
"--
|
|
568
|
+
"--noconfoundderiv",
|
|
485
569
|
dest="confound_deriv",
|
|
486
570
|
action="store_false",
|
|
487
571
|
help=(
|
|
488
|
-
"
|
|
572
|
+
"Do not use derivatives in confound regression. Default is to use temporal derivatives."
|
|
489
573
|
),
|
|
490
574
|
default=True,
|
|
491
575
|
)
|
|
@@ -500,32 +584,32 @@ def _get_parser():
|
|
|
500
584
|
)
|
|
501
585
|
preproc.add_argument(
|
|
502
586
|
"--globalsignalmethod",
|
|
503
|
-
dest="
|
|
587
|
+
dest="initregressorsignalmethod",
|
|
504
588
|
action="store",
|
|
505
589
|
type=str,
|
|
506
590
|
choices=["sum", "meanscale", "pca", "random"],
|
|
507
591
|
help=(
|
|
508
|
-
"The method for constructing the initial
|
|
509
|
-
"mean scaling each voxel prior to summation, MLE PCA of the voxels in the
|
|
592
|
+
"The method for constructing the initial signal regressor - straight summation, "
|
|
593
|
+
"mean scaling each voxel prior to summation, MLE PCA of the voxels in the initial regressor mask, "
|
|
510
594
|
"or initializing using random noise."
|
|
511
|
-
f'Default is "{
|
|
595
|
+
f'Default is "{DEFAULT_INITREGRESSOR_METHOD}."'
|
|
512
596
|
),
|
|
513
|
-
default=
|
|
597
|
+
default=DEFAULT_INITREGRESSOR_METHOD,
|
|
514
598
|
)
|
|
515
599
|
preproc.add_argument(
|
|
516
600
|
"--globalpcacomponents",
|
|
517
|
-
dest="
|
|
601
|
+
dest="initregressorpcacomponents",
|
|
518
602
|
action="store",
|
|
519
603
|
type=float,
|
|
520
604
|
metavar="VALUE",
|
|
521
605
|
help=(
|
|
522
|
-
"Number of PCA components used for estimating the
|
|
606
|
+
"Number of PCA components used for estimating the initial regressor. If VALUE >= 1, will retain this"
|
|
523
607
|
"many components. If "
|
|
524
608
|
"0.0 < VALUE < 1.0, enough components will be retained to explain the fraction VALUE of the "
|
|
525
609
|
"total variance. If VALUE is negative, the number of components will be to retain will be selected "
|
|
526
|
-
f"automatically using the MLE method. Default is {
|
|
610
|
+
f"automatically using the MLE method. Default is {DEFAULT_INITREGRESSOR_PCACOMPONENTS}."
|
|
527
611
|
),
|
|
528
|
-
default=
|
|
612
|
+
default=DEFAULT_INITREGRESSOR_PCACOMPONENTS,
|
|
529
613
|
)
|
|
530
614
|
preproc.add_argument(
|
|
531
615
|
"--slicetimes",
|
|
@@ -540,7 +624,7 @@ def _get_parser():
|
|
|
540
624
|
"--numskip",
|
|
541
625
|
dest="preprocskip",
|
|
542
626
|
action="store",
|
|
543
|
-
type=
|
|
627
|
+
type=lambda x: pf.is_int(parser, x, minval=0),
|
|
544
628
|
metavar="SKIP",
|
|
545
629
|
help=(
|
|
546
630
|
"SKIP TRs were previously deleted during "
|
|
@@ -549,19 +633,6 @@ def _get_parser():
|
|
|
549
633
|
),
|
|
550
634
|
default=0,
|
|
551
635
|
)
|
|
552
|
-
preproc.add_argument(
|
|
553
|
-
"--numtozero",
|
|
554
|
-
dest="numtozero",
|
|
555
|
-
action="store",
|
|
556
|
-
type=int,
|
|
557
|
-
metavar="NUMPOINTS",
|
|
558
|
-
help=(
|
|
559
|
-
"When calculating the moving regressor, set this number of points to zero at the beginning of the "
|
|
560
|
-
"voxel timecourses. This prevents initial points which may not be in equilibrium from contaminating the "
|
|
561
|
-
"calculated sLFO signal. This may improve similarity fitting and GLM noise removal. Default is 0."
|
|
562
|
-
),
|
|
563
|
-
default=0,
|
|
564
|
-
)
|
|
565
636
|
preproc.add_argument(
|
|
566
637
|
"--timerange",
|
|
567
638
|
dest="timerange",
|
|
@@ -577,6 +648,34 @@ def _get_parser():
|
|
|
577
648
|
),
|
|
578
649
|
default=(-1, -1),
|
|
579
650
|
)
|
|
651
|
+
preproc.add_argument(
|
|
652
|
+
"--tincludemask",
|
|
653
|
+
dest="tincludemaskname",
|
|
654
|
+
action="store",
|
|
655
|
+
type=lambda x: pf.is_valid_file(parser, x),
|
|
656
|
+
metavar="FILE",
|
|
657
|
+
help=(
|
|
658
|
+
"Only correlate during epochs specified "
|
|
659
|
+
"in MASKFILE (NB: each line of FILE "
|
|
660
|
+
"contains the time and duration of an "
|
|
661
|
+
"epoch to include."
|
|
662
|
+
),
|
|
663
|
+
default=None,
|
|
664
|
+
)
|
|
665
|
+
preproc.add_argument(
|
|
666
|
+
"--texcludemask",
|
|
667
|
+
dest="texcludemaskname",
|
|
668
|
+
action="store",
|
|
669
|
+
type=lambda x: pf.is_valid_file(parser, x),
|
|
670
|
+
metavar="FILE",
|
|
671
|
+
help=(
|
|
672
|
+
"Do not correlate during epochs specified "
|
|
673
|
+
"in MASKFILE (NB: each line of FILE "
|
|
674
|
+
"contains the time and duration of an "
|
|
675
|
+
"epoch to exclude."
|
|
676
|
+
),
|
|
677
|
+
default=None,
|
|
678
|
+
)
|
|
580
679
|
preproc.add_argument(
|
|
581
680
|
"--nothresh",
|
|
582
681
|
dest="nothresh",
|
|
@@ -617,7 +716,7 @@ def _get_parser():
|
|
|
617
716
|
"--regressorfreq",
|
|
618
717
|
dest="inputfreq",
|
|
619
718
|
action="store",
|
|
620
|
-
type=lambda x: pf.is_float(parser, x),
|
|
719
|
+
type=lambda x: pf.is_float(parser, x, minval=0.0),
|
|
621
720
|
metavar="FREQ",
|
|
622
721
|
help=(
|
|
623
722
|
"Probe regressor in file has sample "
|
|
@@ -712,10 +811,10 @@ def _get_parser():
|
|
|
712
811
|
dest="similaritymetric",
|
|
713
812
|
action="store",
|
|
714
813
|
type=str,
|
|
715
|
-
choices=["correlation", "mutualinfo", "hybrid"],
|
|
814
|
+
choices=["correlation", "mutualinfo", "hybrid", "riptide"],
|
|
716
815
|
help=(
|
|
717
816
|
"Similarity metric for finding delay values. "
|
|
718
|
-
'Choices are "correlation", "mutualinfo", and "
|
|
817
|
+
'Choices are "correlation", "mutualinfo", "hybrid", and "riptide". '
|
|
719
818
|
f"Default is {DEFAULT_SIMILARITYMETRIC}."
|
|
720
819
|
),
|
|
721
820
|
default=DEFAULT_SIMILARITYMETRIC,
|
|
@@ -755,16 +854,19 @@ def _get_parser():
|
|
|
755
854
|
# Correlation fitting options
|
|
756
855
|
corr_fit = parser.add_argument_group("Correlation fitting options")
|
|
757
856
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
"
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
857
|
+
corr_fit.add_argument(
|
|
858
|
+
"--initialdelay",
|
|
859
|
+
dest="initialdelayvalue",
|
|
860
|
+
type=lambda x: pf.is_valid_file_or_float(parser, x),
|
|
861
|
+
metavar="DELAY",
|
|
862
|
+
help=(
|
|
863
|
+
"Start the analysis with predefined delays. If DELAY is a filename, use it as an initial delay map; "
|
|
864
|
+
"if DELAY is a float, initialize all voxels to a delay of DELAY seconds."
|
|
865
|
+
),
|
|
866
|
+
default=0.0,
|
|
767
867
|
)
|
|
868
|
+
|
|
869
|
+
fixdelay = corr_fit.add_mutually_exclusive_group()
|
|
768
870
|
fixdelay.add_argument(
|
|
769
871
|
"--searchrange",
|
|
770
872
|
dest="lag_extrema",
|
|
@@ -778,6 +880,13 @@ def _get_parser():
|
|
|
778
880
|
),
|
|
779
881
|
default=(DEFAULT_LAGMIN, DEFAULT_LAGMAX),
|
|
780
882
|
)
|
|
883
|
+
fixdelay.add_argument(
|
|
884
|
+
"--nodelayfit",
|
|
885
|
+
dest="fixdelay",
|
|
886
|
+
action="store_true",
|
|
887
|
+
help=("Fix the delay in every voxel to its initial value. Do not perform any fitting."),
|
|
888
|
+
default=False,
|
|
889
|
+
)
|
|
781
890
|
corr_fit.add_argument(
|
|
782
891
|
"--sigmalimit",
|
|
783
892
|
dest="widthmax",
|
|
@@ -823,7 +932,7 @@ def _get_parser():
|
|
|
823
932
|
"--despecklepasses",
|
|
824
933
|
dest="despeckle_passes",
|
|
825
934
|
action=pf.IndicateSpecifiedAction,
|
|
826
|
-
type=
|
|
935
|
+
type=lambda x: pf.is_int(parser, x, minval=0),
|
|
827
936
|
metavar="PASSES",
|
|
828
937
|
help=(
|
|
829
938
|
"Detect and refit suspect correlations to "
|
|
@@ -877,8 +986,8 @@ def _get_parser():
|
|
|
877
986
|
reg_ref.add_argument(
|
|
878
987
|
"--passes",
|
|
879
988
|
dest="passes",
|
|
880
|
-
action=
|
|
881
|
-
type=
|
|
989
|
+
action=pf.IndicateSpecifiedAction,
|
|
990
|
+
type=lambda x: pf.is_int(parser, x, minval=1),
|
|
882
991
|
metavar="PASSES",
|
|
883
992
|
help=("Set the number of processing passes to PASSES. " f"Default is {DEFAULT_PASSES}."),
|
|
884
993
|
default=DEFAULT_PASSES,
|
|
@@ -999,15 +1108,6 @@ def _get_parser():
|
|
|
999
1108
|
help=("Disables selecting the leftmost delay peak when setting the refine offset."),
|
|
1000
1109
|
default=True,
|
|
1001
1110
|
)
|
|
1002
|
-
reg_ref.add_argument(
|
|
1003
|
-
"--pickleft",
|
|
1004
|
-
dest="dummy",
|
|
1005
|
-
action="store_true",
|
|
1006
|
-
help=(
|
|
1007
|
-
"DEPRECATED. pickleft is now on by default. Use 'nopickleft' to disable it instead."
|
|
1008
|
-
),
|
|
1009
|
-
default=True,
|
|
1010
|
-
)
|
|
1011
1111
|
reg_ref.add_argument(
|
|
1012
1112
|
"--pickleftthresh",
|
|
1013
1113
|
dest="pickleftthresh",
|
|
@@ -1015,11 +1115,23 @@ def _get_parser():
|
|
|
1015
1115
|
metavar="THRESH",
|
|
1016
1116
|
type=float,
|
|
1017
1117
|
help=(
|
|
1018
|
-
"
|
|
1118
|
+
"Threshold value (fraction of maximum) in a histogram "
|
|
1019
1119
|
f"to be considered the start of a peak. Default is {DEFAULT_PICKLEFT_THRESH}."
|
|
1020
1120
|
),
|
|
1021
1121
|
default=DEFAULT_PICKLEFT_THRESH,
|
|
1022
1122
|
)
|
|
1123
|
+
reg_ref.add_argument(
|
|
1124
|
+
"--sLFOnoiseampwindow",
|
|
1125
|
+
dest="sLFOnoiseampwindow",
|
|
1126
|
+
action="store",
|
|
1127
|
+
metavar="SECONDS",
|
|
1128
|
+
type=float,
|
|
1129
|
+
help=(
|
|
1130
|
+
"Width of the averaging window for filtering the RMS sLFO waveform to calculate "
|
|
1131
|
+
f"amplitude change over time. Default is {DEFAULT_SLFONOISEAMP_WINDOWSIZE}."
|
|
1132
|
+
),
|
|
1133
|
+
default=DEFAULT_SLFONOISEAMP_WINDOWSIZE,
|
|
1134
|
+
)
|
|
1023
1135
|
|
|
1024
1136
|
refine = reg_ref.add_mutually_exclusive_group()
|
|
1025
1137
|
refine.add_argument(
|
|
@@ -1080,31 +1192,31 @@ def _get_parser():
|
|
|
1080
1192
|
"--maxpasses",
|
|
1081
1193
|
dest="maxpasses",
|
|
1082
1194
|
action="store",
|
|
1083
|
-
type=
|
|
1195
|
+
type=lambda x: pf.is_int(parser, x, minval=1),
|
|
1084
1196
|
metavar="MAXPASSES",
|
|
1085
1197
|
help=(
|
|
1086
|
-
"Terminate refinement after MAXPASSES passes, whether or not convergence has
|
|
1198
|
+
"Terminate refinement after MAXPASSES passes, whether or not convergence has occurred. "
|
|
1087
1199
|
f"Default is {DEFAULT_MAXPASSES}."
|
|
1088
1200
|
),
|
|
1089
1201
|
default=DEFAULT_MAXPASSES,
|
|
1090
1202
|
)
|
|
1091
1203
|
|
|
1092
|
-
#
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"--
|
|
1096
|
-
dest="
|
|
1204
|
+
# sLFO noise removal options
|
|
1205
|
+
slfofilt = parser.add_argument_group("sLFO noise removal options")
|
|
1206
|
+
slfofilt.add_argument(
|
|
1207
|
+
"--nodenoise",
|
|
1208
|
+
dest="dolinfitfilt",
|
|
1097
1209
|
action="store_false",
|
|
1098
1210
|
help=(
|
|
1099
|
-
"Turn off
|
|
1211
|
+
"Turn off regression filtering to remove delayed "
|
|
1100
1212
|
"regressor from each voxel (disables output of "
|
|
1101
1213
|
"fitNorm)."
|
|
1102
1214
|
),
|
|
1103
1215
|
default=True,
|
|
1104
1216
|
)
|
|
1105
|
-
|
|
1106
|
-
"--
|
|
1107
|
-
dest="
|
|
1217
|
+
slfofilt.add_argument(
|
|
1218
|
+
"--denoisesourcefile",
|
|
1219
|
+
dest="denoisesourcefile",
|
|
1108
1220
|
action="store",
|
|
1109
1221
|
type=lambda x: pf.is_valid_file(parser, x),
|
|
1110
1222
|
metavar="FILE",
|
|
@@ -1115,23 +1227,63 @@ def _get_parser():
|
|
|
1115
1227
|
),
|
|
1116
1228
|
default=None,
|
|
1117
1229
|
)
|
|
1118
|
-
|
|
1230
|
+
slfofilt.add_argument(
|
|
1119
1231
|
"--preservefiltering",
|
|
1120
1232
|
dest="preservefiltering",
|
|
1121
1233
|
action="store_true",
|
|
1122
|
-
help="Don't reread data prior to performing
|
|
1234
|
+
help="Don't reread data prior to performing sLFO filtering.",
|
|
1123
1235
|
default=False,
|
|
1124
1236
|
)
|
|
1125
|
-
|
|
1126
|
-
"--
|
|
1127
|
-
dest="
|
|
1237
|
+
slfofilt.add_argument(
|
|
1238
|
+
"--regressderivs",
|
|
1239
|
+
dest="regressderivs",
|
|
1128
1240
|
action="store",
|
|
1129
|
-
type=
|
|
1241
|
+
type=lambda x: pf.is_int(parser, x, minval=0),
|
|
1130
1242
|
metavar="NDERIVS",
|
|
1131
1243
|
help=(
|
|
1132
|
-
f"When doing final
|
|
1244
|
+
f"When doing final sLFO filtering, include derivatives up to NDERIVS order. Default is {DEFAULT_REGRESSIONFILTDERIVS}"
|
|
1133
1245
|
),
|
|
1134
|
-
default=
|
|
1246
|
+
default=DEFAULT_REGRESSIONFILTDERIVS,
|
|
1247
|
+
)
|
|
1248
|
+
slfofilt.add_argument(
|
|
1249
|
+
"--norefinedelay",
|
|
1250
|
+
dest="refinedelay",
|
|
1251
|
+
action="store_false",
|
|
1252
|
+
help=("Do not calculate a refined delay map using sLFO regression information."),
|
|
1253
|
+
default=True,
|
|
1254
|
+
)
|
|
1255
|
+
slfofilt.add_argument(
|
|
1256
|
+
"--nofilterwithrefineddelay",
|
|
1257
|
+
dest="filterwithrefineddelay",
|
|
1258
|
+
action="store_false",
|
|
1259
|
+
help=("Do not use the refined delay in sLFO filter."),
|
|
1260
|
+
default=True,
|
|
1261
|
+
)
|
|
1262
|
+
slfofilt.add_argument(
|
|
1263
|
+
"--delaypatchthresh",
|
|
1264
|
+
dest="delaypatchthresh",
|
|
1265
|
+
action="store",
|
|
1266
|
+
type=float,
|
|
1267
|
+
metavar="NUMMADs",
|
|
1268
|
+
help=(
|
|
1269
|
+
"Maximum number of robust standard deviations to permit in the offset delay refine map. "
|
|
1270
|
+
f"Default is {DEFAULT_PATCHTHRESH}"
|
|
1271
|
+
),
|
|
1272
|
+
default=DEFAULT_PATCHTHRESH,
|
|
1273
|
+
)
|
|
1274
|
+
slfofilt.add_argument(
|
|
1275
|
+
"--delayoffsetspatialfilt",
|
|
1276
|
+
dest="delayoffsetgausssigma",
|
|
1277
|
+
action="store",
|
|
1278
|
+
type=float,
|
|
1279
|
+
metavar="GAUSSSIGMA",
|
|
1280
|
+
help=(
|
|
1281
|
+
"Spatially filter fMRI data prior to calculating delay offsets "
|
|
1282
|
+
"using GAUSSSIGMA in mm. Set GAUSSSIGMA negative "
|
|
1283
|
+
"to have rapidtide set it to half the mean voxel "
|
|
1284
|
+
"dimension (a rule of thumb for a good value). Set to 0 to disable."
|
|
1285
|
+
),
|
|
1286
|
+
default=DEFAULT_DELAYOFFSETSPATIALFILT,
|
|
1135
1287
|
)
|
|
1136
1288
|
|
|
1137
1289
|
# Output options
|
|
@@ -1144,7 +1296,7 @@ def _get_parser():
|
|
|
1144
1296
|
choices=["min", "less", "normal", "more", "max"],
|
|
1145
1297
|
help=(
|
|
1146
1298
|
"The level of file output produced. 'min' produces only absolutely essential files, 'less' adds in "
|
|
1147
|
-
"the
|
|
1299
|
+
"the sLFO filtered data (rather than just filter efficacy metrics), 'normal' saves what you "
|
|
1148
1300
|
"would typically want around for interactive data exploration, "
|
|
1149
1301
|
"'more' adds files that are sometimes useful, and 'max' outputs anything you might possibly want. "
|
|
1150
1302
|
"Selecting 'max' will produce ~3x your input datafile size as output. "
|
|
@@ -1152,16 +1304,6 @@ def _get_parser():
|
|
|
1152
1304
|
),
|
|
1153
1305
|
default=DEFAULT_OUTPUTLEVEL,
|
|
1154
1306
|
)
|
|
1155
|
-
output.add_argument(
|
|
1156
|
-
"--nolimitoutput",
|
|
1157
|
-
dest="limitoutput",
|
|
1158
|
-
action="store_false",
|
|
1159
|
-
help=(
|
|
1160
|
-
"Save some of the large and rarely used files. "
|
|
1161
|
-
"NB: THIS IS NOW DEPRECATED: Use '--outputlevel max' instead."
|
|
1162
|
-
),
|
|
1163
|
-
default=True,
|
|
1164
|
-
)
|
|
1165
1307
|
output.add_argument(
|
|
1166
1308
|
"--savelags",
|
|
1167
1309
|
dest="savecorrtimes",
|
|
@@ -1173,7 +1315,7 @@ def _get_parser():
|
|
|
1173
1315
|
"--histlen", # was -h
|
|
1174
1316
|
dest="histlen",
|
|
1175
1317
|
action="store",
|
|
1176
|
-
type=
|
|
1318
|
+
type=lambda x: pf.is_int(parser, x, minval=5),
|
|
1177
1319
|
metavar="HISTLEN",
|
|
1178
1320
|
help=(f"Change the histogram length to HISTLEN. Default is {DEFAULT_HISTLEN}."),
|
|
1179
1321
|
default=DEFAULT_HISTLEN,
|
|
@@ -1182,7 +1324,7 @@ def _get_parser():
|
|
|
1182
1324
|
"--saveintermediatemaps",
|
|
1183
1325
|
dest="saveintermediatemaps",
|
|
1184
1326
|
action="store_true",
|
|
1185
|
-
help="Save lag times, strengths, widths, and
|
|
1327
|
+
help="Save lag times, strengths, widths, mask (and shiftedtcs, if they'd normally be saved) for each pass.",
|
|
1186
1328
|
default=False,
|
|
1187
1329
|
)
|
|
1188
1330
|
output.add_argument(
|
|
@@ -1225,7 +1367,7 @@ def _get_parser():
|
|
|
1225
1367
|
"--mklthreads",
|
|
1226
1368
|
dest="mklthreads",
|
|
1227
1369
|
action="store",
|
|
1228
|
-
type=
|
|
1370
|
+
type=lambda x: pf.is_int(parser, x, minval=1),
|
|
1229
1371
|
metavar="MKLTHREADS",
|
|
1230
1372
|
help=(
|
|
1231
1373
|
"If mkl library is installed, use no more than MKLTHREADS worker "
|
|
@@ -1253,6 +1395,13 @@ def _get_parser():
|
|
|
1253
1395
|
help=("Will disable showing progress bars (helpful if stdout is going to a file)."),
|
|
1254
1396
|
default=True,
|
|
1255
1397
|
)
|
|
1398
|
+
misc.add_argument(
|
|
1399
|
+
"--makepseudofile",
|
|
1400
|
+
dest="makepseudofile",
|
|
1401
|
+
action="store_true",
|
|
1402
|
+
help=("Make a simulated input file from the mean and the movingsignal."),
|
|
1403
|
+
default=False,
|
|
1404
|
+
)
|
|
1256
1405
|
misc.add_argument(
|
|
1257
1406
|
"--checkpoint",
|
|
1258
1407
|
dest="checkpoint",
|
|
@@ -1279,6 +1428,18 @@ def _get_parser():
|
|
|
1279
1428
|
help=("Use double precision for output files."),
|
|
1280
1429
|
default="single",
|
|
1281
1430
|
)
|
|
1431
|
+
misc.add_argument(
|
|
1432
|
+
"--spatialtolerance",
|
|
1433
|
+
dest="spatialtolerance",
|
|
1434
|
+
action="store",
|
|
1435
|
+
type=float,
|
|
1436
|
+
metavar="EPSILON",
|
|
1437
|
+
help=(
|
|
1438
|
+
"When checking to see if the spatial dimensions of two NIFTI files match, allow a relative difference "
|
|
1439
|
+
"of EPSILON in any dimension. By default, this is set to 0.0, requiring an exact match. "
|
|
1440
|
+
),
|
|
1441
|
+
default=0.0,
|
|
1442
|
+
)
|
|
1282
1443
|
misc.add_argument(
|
|
1283
1444
|
"--cifti",
|
|
1284
1445
|
dest="isgrayordinate",
|
|
@@ -1307,19 +1468,44 @@ def _get_parser():
|
|
|
1307
1468
|
help=("Disable use of shared memory for large array storage."),
|
|
1308
1469
|
default=True,
|
|
1309
1470
|
)
|
|
1310
|
-
misc.add_argument(
|
|
1311
|
-
"--memprofile",
|
|
1312
|
-
dest="memprofile",
|
|
1313
|
-
action="store_true",
|
|
1314
|
-
help=("Enable memory profiling - " "warning: this slows things down a lot."),
|
|
1315
|
-
default=False,
|
|
1316
|
-
)
|
|
1317
1471
|
pf.addtagopts(misc)
|
|
1318
1472
|
|
|
1319
1473
|
# Experimental options (not fully tested, may not work)
|
|
1320
1474
|
experimental = parser.add_argument_group(
|
|
1321
1475
|
"Experimental options (not fully tested, or not tested at all, may not work). Beware!"
|
|
1322
1476
|
)
|
|
1477
|
+
experimental.add_argument(
|
|
1478
|
+
"--riptidestep", # was -h
|
|
1479
|
+
dest="riptidestep",
|
|
1480
|
+
action="store",
|
|
1481
|
+
type=lambda x: pf.is_float(parser, x, maxval=5.0),
|
|
1482
|
+
metavar="STEP",
|
|
1483
|
+
help=(
|
|
1484
|
+
f"Timestep between RIPTiDe regressors, in seconds. Default is {DEFAULT_RIPTIDESTEP}."
|
|
1485
|
+
),
|
|
1486
|
+
default=DEFAULT_RIPTIDESTEP,
|
|
1487
|
+
)
|
|
1488
|
+
experimental.add_argument(
|
|
1489
|
+
"--refinedelayeachpass",
|
|
1490
|
+
dest="refinedelayeachpass",
|
|
1491
|
+
action="store_true",
|
|
1492
|
+
help=("Do delay refinement in each pass."),
|
|
1493
|
+
default=False,
|
|
1494
|
+
)
|
|
1495
|
+
experimental.add_argument(
|
|
1496
|
+
"--dofinalrefine",
|
|
1497
|
+
dest="dofinalrefine",
|
|
1498
|
+
action="store_true",
|
|
1499
|
+
help=("Do regressor refinement on the final pass."),
|
|
1500
|
+
default=False,
|
|
1501
|
+
)
|
|
1502
|
+
experimental.add_argument(
|
|
1503
|
+
"--sLFOfiltmask",
|
|
1504
|
+
dest="sLFOfiltmask",
|
|
1505
|
+
action="store_true",
|
|
1506
|
+
help=("Limit sLFO filter to fit voxels."),
|
|
1507
|
+
default=False,
|
|
1508
|
+
)
|
|
1323
1509
|
experimental.add_argument(
|
|
1324
1510
|
"--territorymap",
|
|
1325
1511
|
dest="territorymap",
|
|
@@ -1334,13 +1520,6 @@ def _get_parser():
|
|
|
1334
1520
|
),
|
|
1335
1521
|
default=None,
|
|
1336
1522
|
)
|
|
1337
|
-
experimental.add_argument(
|
|
1338
|
-
"--psdfilter",
|
|
1339
|
-
dest="psdfilter",
|
|
1340
|
-
action="store_true",
|
|
1341
|
-
help=("Apply a PSD weighted Wiener filter to shifted timecourses prior to refinement."),
|
|
1342
|
-
default=False,
|
|
1343
|
-
)
|
|
1344
1523
|
experimental.add_argument(
|
|
1345
1524
|
"--wiener",
|
|
1346
1525
|
dest="dodeconv",
|
|
@@ -1348,38 +1527,6 @@ def _get_parser():
|
|
|
1348
1527
|
help=("Do Wiener deconvolution to find voxel transfer function."),
|
|
1349
1528
|
default=False,
|
|
1350
1529
|
)
|
|
1351
|
-
experimental.add_argument(
|
|
1352
|
-
"--corrbaselinespatialsigma",
|
|
1353
|
-
dest="corrbaselinespatialsigma",
|
|
1354
|
-
action="store",
|
|
1355
|
-
type=float,
|
|
1356
|
-
metavar="SIGMA",
|
|
1357
|
-
help=("Spatial lowpass kernel, in mm, for filtering the correlation function baseline. "),
|
|
1358
|
-
default=0.0,
|
|
1359
|
-
)
|
|
1360
|
-
experimental.add_argument(
|
|
1361
|
-
"--corrbaselinetemphpfcutoff",
|
|
1362
|
-
dest="corrbaselinetemphpfcutoff",
|
|
1363
|
-
action="store",
|
|
1364
|
-
type=float,
|
|
1365
|
-
metavar="FREQ",
|
|
1366
|
-
help=(
|
|
1367
|
-
"Temporal highpass cutoff, in Hz, for filtering the correlation function baseline. "
|
|
1368
|
-
),
|
|
1369
|
-
default=0.0,
|
|
1370
|
-
)
|
|
1371
|
-
experimental.add_argument(
|
|
1372
|
-
"--spatialtolerance",
|
|
1373
|
-
dest="spatialtolerance",
|
|
1374
|
-
action="store",
|
|
1375
|
-
type=float,
|
|
1376
|
-
metavar="EPSILON",
|
|
1377
|
-
help=(
|
|
1378
|
-
"When checking to see if the spatial dimensions of two NIFTI files match, allow a relative difference "
|
|
1379
|
-
"of EPSILON in any dimension. By default, this is set to 0.0, requiring an exact match. "
|
|
1380
|
-
),
|
|
1381
|
-
default=0.0,
|
|
1382
|
-
)
|
|
1383
1530
|
experimental.add_argument(
|
|
1384
1531
|
"--echocancel",
|
|
1385
1532
|
dest="echocancel",
|
|
@@ -1394,68 +1541,6 @@ def _get_parser():
|
|
|
1394
1541
|
help=("Attempt to detect and remove respiratory signal that strays into " "the LFO band."),
|
|
1395
1542
|
default=False,
|
|
1396
1543
|
)
|
|
1397
|
-
|
|
1398
|
-
experimental.add_argument(
|
|
1399
|
-
"--noisetimecourse",
|
|
1400
|
-
dest="noisetimecoursespec",
|
|
1401
|
-
metavar="FILENAME[:VALSPEC]",
|
|
1402
|
-
help=(
|
|
1403
|
-
"Find and remove any instance of the timecourse supplied from any regressors used for analysis. "
|
|
1404
|
-
"(if VALSPEC is given, and there are multiple timecourses in the file, use the indicated timecourse."
|
|
1405
|
-
"This can be the name of the regressor if it's in the file, or the column number). "
|
|
1406
|
-
),
|
|
1407
|
-
default=None,
|
|
1408
|
-
)
|
|
1409
|
-
noise_group = experimental.add_mutually_exclusive_group()
|
|
1410
|
-
noise_group.add_argument(
|
|
1411
|
-
"--noisefreq",
|
|
1412
|
-
dest="noisefreq",
|
|
1413
|
-
action="store",
|
|
1414
|
-
type=lambda x: pf.is_float(parser, x),
|
|
1415
|
-
metavar="FREQ",
|
|
1416
|
-
help=(
|
|
1417
|
-
"Noise timecourse in file has sample "
|
|
1418
|
-
"frequency FREQ (default is 1/tr) "
|
|
1419
|
-
"NB: --noisefreq and --noisetstep) "
|
|
1420
|
-
"are two ways to specify the same thing."
|
|
1421
|
-
),
|
|
1422
|
-
default="auto",
|
|
1423
|
-
)
|
|
1424
|
-
noise_group.add_argument(
|
|
1425
|
-
"--noisetstep",
|
|
1426
|
-
dest="noisefreq",
|
|
1427
|
-
action="store",
|
|
1428
|
-
type=lambda x: pf.invert_float(parser, x),
|
|
1429
|
-
metavar="TSTEP",
|
|
1430
|
-
help=(
|
|
1431
|
-
"Noise timecourse in file has sample "
|
|
1432
|
-
"frequency FREQ (default is 1/tr) "
|
|
1433
|
-
"NB: --noisefreq and --noisetstep) "
|
|
1434
|
-
"are two ways to specify the same thing."
|
|
1435
|
-
),
|
|
1436
|
-
default="auto",
|
|
1437
|
-
)
|
|
1438
|
-
experimental.add_argument(
|
|
1439
|
-
"--noisestart",
|
|
1440
|
-
dest="noisestarttime",
|
|
1441
|
-
action="store",
|
|
1442
|
-
type=float,
|
|
1443
|
-
metavar="START",
|
|
1444
|
-
help=(
|
|
1445
|
-
"The time delay in seconds into the noise timecourse "
|
|
1446
|
-
"file, corresponding in the first TR of the fMRI "
|
|
1447
|
-
"file (default is 0.0)."
|
|
1448
|
-
),
|
|
1449
|
-
default=0.0,
|
|
1450
|
-
)
|
|
1451
|
-
experimental.add_argument(
|
|
1452
|
-
"--noiseinvert",
|
|
1453
|
-
dest="noiseinvert",
|
|
1454
|
-
action="store_true",
|
|
1455
|
-
help=("Invert noise regressor prior to alignment."),
|
|
1456
|
-
default=False,
|
|
1457
|
-
)
|
|
1458
|
-
|
|
1459
1544
|
experimental.add_argument(
|
|
1460
1545
|
"--acfix",
|
|
1461
1546
|
dest="fix_autocorrelation",
|
|
@@ -1493,6 +1578,15 @@ def _get_parser():
|
|
|
1493
1578
|
),
|
|
1494
1579
|
default=False,
|
|
1495
1580
|
)
|
|
1581
|
+
experimental.add_argument(
|
|
1582
|
+
"--donotfilterinputdata",
|
|
1583
|
+
dest="filterinputdata",
|
|
1584
|
+
action="store_false",
|
|
1585
|
+
help=(
|
|
1586
|
+
"Do not filter input data prior to similarity calculation. May make processing faster."
|
|
1587
|
+
),
|
|
1588
|
+
default=True,
|
|
1589
|
+
)
|
|
1496
1590
|
experimental.add_argument(
|
|
1497
1591
|
"--dispersioncalc",
|
|
1498
1592
|
dest="dodispersioncalc",
|
|
@@ -1501,18 +1595,74 @@ def _get_parser():
|
|
|
1501
1595
|
default=False,
|
|
1502
1596
|
)
|
|
1503
1597
|
experimental.add_argument(
|
|
1504
|
-
"--
|
|
1505
|
-
dest="
|
|
1598
|
+
"--patchshift",
|
|
1599
|
+
dest="patchshift",
|
|
1600
|
+
action="store_true",
|
|
1601
|
+
help=("Perform patch shift correction."),
|
|
1602
|
+
default=False,
|
|
1603
|
+
)
|
|
1604
|
+
experimental.add_argument(
|
|
1605
|
+
"--prewhitenregressor",
|
|
1606
|
+
dest="prewhitenregressor",
|
|
1607
|
+
action="store_true",
|
|
1608
|
+
help=("Prewhiten probe regressor prior to calculating correlations."),
|
|
1609
|
+
default=False,
|
|
1610
|
+
)
|
|
1611
|
+
experimental.add_argument(
|
|
1612
|
+
"--prewhitenlags",
|
|
1613
|
+
dest="prewhitenlags",
|
|
1506
1614
|
action="store",
|
|
1507
|
-
type=lambda x: pf.
|
|
1508
|
-
metavar="
|
|
1615
|
+
type=lambda x: pf.is_int(parser, x, minval=0),
|
|
1616
|
+
metavar="LAGS",
|
|
1509
1617
|
help=(
|
|
1510
|
-
"
|
|
1511
|
-
"in MASKFILE (NB: each line of FILE "
|
|
1512
|
-
"contains the time and duration of an "
|
|
1513
|
-
"epoch to include."
|
|
1618
|
+
f"Set number of TRs to use in prewhitening. Set to -1 to calculate automatically. Default is {DEFAULT_PREWHITEN_LAGS}."
|
|
1514
1619
|
),
|
|
1515
|
-
default=
|
|
1620
|
+
default=DEFAULT_PREWHITEN_LAGS,
|
|
1621
|
+
)
|
|
1622
|
+
|
|
1623
|
+
# Deprecated options
|
|
1624
|
+
deprecated = parser.add_argument_group(
|
|
1625
|
+
"Deprecated options. These options will go away in the indeterminate future. Don't use them."
|
|
1626
|
+
)
|
|
1627
|
+
deprecated.add_argument(
|
|
1628
|
+
"--refinedelay",
|
|
1629
|
+
dest="dummy",
|
|
1630
|
+
action="store_true",
|
|
1631
|
+
help=(
|
|
1632
|
+
"Calculate a refined delay map using regression coefficient information. ***DEPRECATED***: refinedelay is now on by default."
|
|
1633
|
+
),
|
|
1634
|
+
default=True,
|
|
1635
|
+
)
|
|
1636
|
+
deprecated.add_argument(
|
|
1637
|
+
"--nolimitoutput",
|
|
1638
|
+
dest="limitoutput",
|
|
1639
|
+
action="store_false",
|
|
1640
|
+
help=(
|
|
1641
|
+
"Save some of the large and rarely used files. "
|
|
1642
|
+
"***DEPRECATED***: Use '--outputlevel max' instead."
|
|
1643
|
+
),
|
|
1644
|
+
default=True,
|
|
1645
|
+
)
|
|
1646
|
+
deprecated.add_argument(
|
|
1647
|
+
"--pickleft",
|
|
1648
|
+
dest="dummy",
|
|
1649
|
+
action="store_true",
|
|
1650
|
+
help=(
|
|
1651
|
+
"***DEPRECATED***: pickleft is now on by default. Use 'nopickleft' to disable it instead."
|
|
1652
|
+
),
|
|
1653
|
+
default=True,
|
|
1654
|
+
)
|
|
1655
|
+
deprecated.add_argument(
|
|
1656
|
+
"--noglm",
|
|
1657
|
+
dest="dolinfitfilt",
|
|
1658
|
+
action="store_false",
|
|
1659
|
+
help=(
|
|
1660
|
+
"Turn off regression filtering to remove delayed "
|
|
1661
|
+
"regressor from each voxel (disables output of "
|
|
1662
|
+
"fitNorm)."
|
|
1663
|
+
"***DEPRECATED***: Use '--nodenoise' instead."
|
|
1664
|
+
),
|
|
1665
|
+
default=True,
|
|
1516
1666
|
)
|
|
1517
1667
|
|
|
1518
1668
|
# Debugging options
|
|
@@ -1530,7 +1680,7 @@ def _get_parser():
|
|
|
1530
1680
|
"--focaldebug",
|
|
1531
1681
|
dest="focaldebug",
|
|
1532
1682
|
action="store_true",
|
|
1533
|
-
help=("Enable
|
|
1683
|
+
help=("Enable targeted additional debugging output (used during development)."),
|
|
1534
1684
|
default=False,
|
|
1535
1685
|
)
|
|
1536
1686
|
debugging.add_argument(
|
|
@@ -1541,10 +1691,10 @@ def _get_parser():
|
|
|
1541
1691
|
default=False,
|
|
1542
1692
|
)
|
|
1543
1693
|
debugging.add_argument(
|
|
1544
|
-
"--
|
|
1545
|
-
dest="
|
|
1694
|
+
"--disablecontainermemfix",
|
|
1695
|
+
dest="containermemfix",
|
|
1546
1696
|
action="store_false",
|
|
1547
|
-
help=("Disable
|
|
1697
|
+
help=("Disable container memory limit setting."),
|
|
1548
1698
|
default=True,
|
|
1549
1699
|
)
|
|
1550
1700
|
debugging.add_argument(
|
|
@@ -1604,10 +1754,10 @@ def _get_parser():
|
|
|
1604
1754
|
default=False,
|
|
1605
1755
|
)
|
|
1606
1756
|
debugging.add_argument(
|
|
1607
|
-
"--
|
|
1608
|
-
dest="
|
|
1757
|
+
"--singleproc_regressionfilt",
|
|
1758
|
+
dest="singleproc_regressionfilt",
|
|
1609
1759
|
action="store_true",
|
|
1610
|
-
help=("Force single proc path for
|
|
1760
|
+
help=("Force single proc path for regression filtering."),
|
|
1611
1761
|
default=False,
|
|
1612
1762
|
)
|
|
1613
1763
|
debugging.add_argument(
|
|
@@ -1628,9 +1778,51 @@ def _get_parser():
|
|
|
1628
1778
|
return parser
|
|
1629
1779
|
|
|
1630
1780
|
|
|
1631
|
-
def process_args(inputargs=None):
|
|
1781
|
+
def process_args(inputargs: Optional[Any] = None) -> Tuple[Any, object]:
|
|
1632
1782
|
"""
|
|
1633
1783
|
Compile arguments for rapidtide workflow.
|
|
1784
|
+
|
|
1785
|
+
This function processes command-line arguments and sets up the configuration
|
|
1786
|
+
for the rapidtide workflow. It handles argument parsing, logging setup,
|
|
1787
|
+
command-line saving, and various parameter defaults and overrides based on
|
|
1788
|
+
analysis modes and macros.
|
|
1789
|
+
|
|
1790
|
+
Parameters
|
|
1791
|
+
----------
|
|
1792
|
+
inputargs : optional
|
|
1793
|
+
Input arguments to be processed. If None, arguments are parsed from
|
|
1794
|
+
sys.argv. Default is None.
|
|
1795
|
+
|
|
1796
|
+
Returns
|
|
1797
|
+
-------
|
|
1798
|
+
tuple
|
|
1799
|
+
A tuple containing:
|
|
1800
|
+
- args : dict
|
|
1801
|
+
Dictionary of processed arguments.
|
|
1802
|
+
- theprefilter : object
|
|
1803
|
+
Preprocessing filter object.
|
|
1804
|
+
|
|
1805
|
+
Notes
|
|
1806
|
+
-----
|
|
1807
|
+
The function performs the following key operations:
|
|
1808
|
+
1. Parses command-line arguments using `_get_parser`
|
|
1809
|
+
2. Sets up logging based on debug flag
|
|
1810
|
+
3. Saves raw and formatted command lines to files
|
|
1811
|
+
4. Applies default values and overrides for various parameters
|
|
1812
|
+
5. Handles analysis modes (delaymapping, denoising, cvrmap, etc.)
|
|
1813
|
+
6. Processes macros (venousrefine, nirs)
|
|
1814
|
+
7. Configures output options based on `outputlevel`
|
|
1815
|
+
8. Sets up pass options and dispersion calculation parameters
|
|
1816
|
+
9. Handles mask specifications and file processing
|
|
1817
|
+
10. Initializes filter options
|
|
1818
|
+
|
|
1819
|
+
Examples
|
|
1820
|
+
--------
|
|
1821
|
+
>>> args, prefilter = process_args()
|
|
1822
|
+
>>> print(args['passes'])
|
|
1823
|
+
1
|
|
1824
|
+
>>> print(args['outputlevel'])
|
|
1825
|
+
'normal'
|
|
1634
1826
|
"""
|
|
1635
1827
|
inargs, argstowrite = pf.setargs(_get_parser, inputargs=inputargs)
|
|
1636
1828
|
args = vars(inargs)
|
|
@@ -1644,7 +1836,7 @@ def process_args(inputargs=None):
|
|
|
1644
1836
|
# save the raw and formatted command lines
|
|
1645
1837
|
args["commandlineargs"] = argstowrite[1:]
|
|
1646
1838
|
thecommandline = " ".join(argstowrite)
|
|
1647
|
-
tide_io.writevec([thecommandline], args["outputname"] + "_commandline.txt")
|
|
1839
|
+
tide_io.writevec(np.array([thecommandline]), args["outputname"] + "_commandline.txt")
|
|
1648
1840
|
formattedcommandline = []
|
|
1649
1841
|
for thetoken in argstowrite[0:3]:
|
|
1650
1842
|
formattedcommandline.append(thetoken)
|
|
@@ -1663,7 +1855,9 @@ def process_args(inputargs=None):
|
|
|
1663
1855
|
else:
|
|
1664
1856
|
suffix = ""
|
|
1665
1857
|
formattedcommandline[i] = prefix + formattedcommandline[i] + suffix
|
|
1666
|
-
tide_io.writevec(
|
|
1858
|
+
tide_io.writevec(
|
|
1859
|
+
np.array(formattedcommandline), args["outputname"] + "_formattedcommandline.txt"
|
|
1860
|
+
)
|
|
1667
1861
|
|
|
1668
1862
|
LGR.debug("\nbefore postprocessing:\n{}".format(args))
|
|
1669
1863
|
|
|
@@ -1672,7 +1866,7 @@ def process_args(inputargs=None):
|
|
|
1672
1866
|
# what fraction of the correlation window to avoid on either end when
|
|
1673
1867
|
# fitting
|
|
1674
1868
|
args["edgebufferfrac"] = 0.0
|
|
1675
|
-
# only do fits in voxels that exceed
|
|
1869
|
+
# only do fits in voxels that exceed threshold
|
|
1676
1870
|
args["enforcethresh"] = True
|
|
1677
1871
|
# if set to the location of the first autocorrelation sidelobe,
|
|
1678
1872
|
# this will fold back sidelobes
|
|
@@ -1685,8 +1879,6 @@ def process_args(inputargs=None):
|
|
|
1685
1879
|
args["absmaxsigma"] = 10000.0
|
|
1686
1880
|
# width of the reference autocorrelation function
|
|
1687
1881
|
args["absminsigma"] = 0.05
|
|
1688
|
-
# search window width for noise regressor mutual information function
|
|
1689
|
-
args["noisesearchwindow"] = 30.0
|
|
1690
1882
|
# number of MADs away from the median to consider an outlier
|
|
1691
1883
|
args["sigdistoutlierfac"] = 10.0
|
|
1692
1884
|
|
|
@@ -1697,11 +1889,12 @@ def process_args(inputargs=None):
|
|
|
1697
1889
|
args["hardlimit"] = True
|
|
1698
1890
|
# The fraction of the main peak over which points are included in the peak
|
|
1699
1891
|
args["searchfrac"] = 0.5
|
|
1700
|
-
args["mp_chunksize"] =
|
|
1892
|
+
args["mp_chunksize"] = 500
|
|
1893
|
+
args["patchminsize"] = DEFAULT_PATCHMINSIZE
|
|
1894
|
+
args["patchfwhm"] = DEFAULT_PATCHFWHM
|
|
1701
1895
|
|
|
1702
1896
|
# significance estimation
|
|
1703
1897
|
args["sighistlen"] = 1000
|
|
1704
|
-
args["dosighistfit"] = True
|
|
1705
1898
|
if args["corrtype"] == "linear":
|
|
1706
1899
|
args["corrpadding"] = -1
|
|
1707
1900
|
# pf.setifnotset(args, "windowfunc", "None")
|
|
@@ -1716,6 +1909,10 @@ def process_args(inputargs=None):
|
|
|
1716
1909
|
args["check_autocorrelation"] = True
|
|
1717
1910
|
args["acwidth"] = 0.0 # width of the reference autocorrelation function
|
|
1718
1911
|
|
|
1912
|
+
# delay refinement
|
|
1913
|
+
args["mindelay"] = DEFAULT_REFINEDELAYMINDELAY
|
|
1914
|
+
args["maxdelay"] = DEFAULT_REFINEDELAYMAXDELAY
|
|
1915
|
+
args["numpoints"] = DEFAULT_REFINEDELAYNUMPOINTS
|
|
1719
1916
|
# diagnostic information about version
|
|
1720
1917
|
(
|
|
1721
1918
|
args["release_version"],
|
|
@@ -1730,6 +1927,8 @@ def process_args(inputargs=None):
|
|
|
1730
1927
|
args = vars(theobj)
|
|
1731
1928
|
|
|
1732
1929
|
# Additional argument parsing not handled by argparse
|
|
1930
|
+
args["passes"] = np.max([args["passes"], 1])
|
|
1931
|
+
|
|
1733
1932
|
args["despeckle_passes"] = np.max([args["despeckle_passes"], 0])
|
|
1734
1933
|
|
|
1735
1934
|
if "lag_extrema_nondefault" in args.keys():
|
|
@@ -1739,6 +1938,9 @@ def process_args(inputargs=None):
|
|
|
1739
1938
|
args["lagmin"] = args["lag_extrema"][0]
|
|
1740
1939
|
args["lagmax"] = args["lag_extrema"][1]
|
|
1741
1940
|
|
|
1941
|
+
if args["prewhitenlags"] == -1:
|
|
1942
|
+
args["prewhitenlags"] = int(np.max([np.fabs(args["lagmin"]), np.fabs(args["lagmax"])]))
|
|
1943
|
+
|
|
1742
1944
|
# set startpoint and endpoint
|
|
1743
1945
|
args["startpoint"], args["endpoint"] = pf.parserange(args["timerange"], descriptor="timerange")
|
|
1744
1946
|
|
|
@@ -1781,18 +1983,22 @@ def process_args(inputargs=None):
|
|
|
1781
1983
|
else:
|
|
1782
1984
|
args["nohistzero"] = True
|
|
1783
1985
|
|
|
1784
|
-
|
|
1785
|
-
|
|
1986
|
+
# sort out initial delay options
|
|
1987
|
+
if args["fixdelay"]:
|
|
1988
|
+
try:
|
|
1989
|
+
tempinitialdelayvalue = float(args["initialdelayvalue"])
|
|
1990
|
+
except ValueError:
|
|
1991
|
+
tempinitialdelayvalue = 0.0
|
|
1786
1992
|
args["lag_extrema"] = (
|
|
1787
|
-
|
|
1788
|
-
|
|
1993
|
+
tempinitialdelayvalue - 10.0,
|
|
1994
|
+
tempinitialdelayvalue + 10.0,
|
|
1789
1995
|
)
|
|
1790
1996
|
else:
|
|
1791
|
-
args["
|
|
1997
|
+
args["initialdelayvalue"] = None
|
|
1792
1998
|
|
|
1793
1999
|
if args["in_file"].endswith("txt") and args["realtr"] == "auto":
|
|
1794
2000
|
raise ValueError(
|
|
1795
|
-
"Either --datatstep or --datafreq must be provided
|
|
2001
|
+
"Either --datatstep or --datafreq must be provided if data file is a text file."
|
|
1796
2002
|
)
|
|
1797
2003
|
|
|
1798
2004
|
if args["realtr"] != "auto":
|
|
@@ -1801,7 +2007,7 @@ def process_args(inputargs=None):
|
|
|
1801
2007
|
if tide_io.checkifcifti(args["in_file"]):
|
|
1802
2008
|
fmri_tr, dummy = tide_io.getciftitr(nib.load(args["in_file"]).header)
|
|
1803
2009
|
else:
|
|
1804
|
-
fmri_tr =
|
|
2010
|
+
fmri_tr, dummy = tide_io.fmritimeinfo(args["in_file"])
|
|
1805
2011
|
args["realtr"] = fmri_tr
|
|
1806
2012
|
|
|
1807
2013
|
if args["inputfreq"] == "auto":
|
|
@@ -1810,32 +2016,27 @@ def process_args(inputargs=None):
|
|
|
1810
2016
|
else:
|
|
1811
2017
|
args["inputfreq_nondefault"] = True
|
|
1812
2018
|
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
)
|
|
1835
|
-
else:
|
|
1836
|
-
args["corrmaskincludename"] = None
|
|
1837
|
-
|
|
1838
|
-
# if brainmaskincludespec is set, set corrmaskinclude to it.
|
|
2019
|
+
# initial mask values from anatomical images (before any overrides)
|
|
2020
|
+
for key in [
|
|
2021
|
+
"corrmaskincludename",
|
|
2022
|
+
"corrmaskincludevals",
|
|
2023
|
+
"initregressorincludename",
|
|
2024
|
+
"initregressorincludevals",
|
|
2025
|
+
"initregressorexcludename",
|
|
2026
|
+
"initregressorexcludevals",
|
|
2027
|
+
"refineincludename",
|
|
2028
|
+
"refineincludevals",
|
|
2029
|
+
"refineexcludename",
|
|
2030
|
+
"refineexcludevals",
|
|
2031
|
+
"offsetincludename",
|
|
2032
|
+
"offsetincludevals",
|
|
2033
|
+
"offsetexcludename",
|
|
2034
|
+
"offsetexcludevals",
|
|
2035
|
+
]:
|
|
2036
|
+
args[key] = None
|
|
2037
|
+
|
|
2038
|
+
# if brainmaskincludespec is set, set initregressorinclude, corrmaskinclude, refineinclude, and offsetinclude to it.
|
|
2039
|
+
brainmasks = ["initregressor", "corrmask", "refine", "offset"]
|
|
1839
2040
|
if args["brainmaskincludespec"] is not None:
|
|
1840
2041
|
(
|
|
1841
2042
|
args["brainmaskincludename"],
|
|
@@ -1845,11 +2046,22 @@ def process_args(inputargs=None):
|
|
|
1845
2046
|
)
|
|
1846
2047
|
if not os.path.isfile(args["brainmaskincludename"]):
|
|
1847
2048
|
raise FileNotFoundError(f"file {args['brainmaskincludename']} does not exist.")
|
|
2049
|
+
for masktype in brainmasks:
|
|
2050
|
+
(
|
|
2051
|
+
args[f"{masktype}includename"],
|
|
2052
|
+
args[f"{masktype}includevals"],
|
|
2053
|
+
) = (
|
|
2054
|
+
args["brainmaskincludename"],
|
|
2055
|
+
args["brainmaskincludevals"],
|
|
2056
|
+
)
|
|
2057
|
+
print(f"setting {masktype}include mask to gray matter mask")
|
|
1848
2058
|
else:
|
|
1849
2059
|
args["brainmaskincludename"] = None
|
|
1850
2060
|
args["brainmaskincludevals"] = None
|
|
1851
2061
|
|
|
1852
|
-
# if graymatterincludespec is set, set
|
|
2062
|
+
# if graymatterincludespec is set, set initregressorinclude, offsetinclude to it.
|
|
2063
|
+
# graymasks = ["initregressor", "offset"]
|
|
2064
|
+
graymasks = ["initregressor"]
|
|
1853
2065
|
if args["graymatterincludespec"] is not None:
|
|
1854
2066
|
(
|
|
1855
2067
|
args["graymatterincludename"],
|
|
@@ -1859,36 +2071,18 @@ def process_args(inputargs=None):
|
|
|
1859
2071
|
)
|
|
1860
2072
|
if not os.path.isfile(args["graymatterincludename"]):
|
|
1861
2073
|
raise FileNotFoundError(f"file {args['graymatterincludename']} does not exist.")
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
args["refineincludevals"],
|
|
1872
|
-
) = (
|
|
1873
|
-
args["graymatterincludename"],
|
|
1874
|
-
args["graymatterincludevals"],
|
|
1875
|
-
)
|
|
1876
|
-
(
|
|
1877
|
-
args["offsetincludename"],
|
|
1878
|
-
args["offsetincludevals"],
|
|
1879
|
-
) = (
|
|
1880
|
-
args["graymatterincludename"],
|
|
1881
|
-
args["graymatterincludevals"],
|
|
1882
|
-
)
|
|
2074
|
+
for masktype in graymasks:
|
|
2075
|
+
(
|
|
2076
|
+
args[f"{masktype}includename"],
|
|
2077
|
+
args[f"{masktype}includevals"],
|
|
2078
|
+
) = (
|
|
2079
|
+
args["graymatterincludename"],
|
|
2080
|
+
args["graymatterincludevals"],
|
|
2081
|
+
)
|
|
2082
|
+
print(f"setting {masktype}include mask to gray matter mask")
|
|
1883
2083
|
else:
|
|
1884
2084
|
args["graymatterincludename"] = None
|
|
1885
2085
|
args["graymatterincludevals"] = None
|
|
1886
|
-
args["globalmeanincludename"] = None
|
|
1887
|
-
args["globalmeanincludevals"] = None
|
|
1888
|
-
args["refineincludename"] = None
|
|
1889
|
-
args["refineincludevals"] = None
|
|
1890
|
-
args["offsetincludename"] = None
|
|
1891
|
-
args["offsetincludevals"] = None
|
|
1892
2086
|
|
|
1893
2087
|
if args["whitematterincludespec"] is not None:
|
|
1894
2088
|
(
|
|
@@ -1901,26 +2095,47 @@ def process_args(inputargs=None):
|
|
|
1901
2095
|
args["whitematterincludename"] = None
|
|
1902
2096
|
args["whitematterincludevals"] = None
|
|
1903
2097
|
|
|
1904
|
-
if args["
|
|
2098
|
+
if args["csfincludespec"] is not None:
|
|
2099
|
+
(
|
|
2100
|
+
args["csfincludename"],
|
|
2101
|
+
args["csfincludevals"],
|
|
2102
|
+
) = tide_io.processnamespec(
|
|
2103
|
+
args["csfincludespec"], "Including voxels where ", "in CSF mask."
|
|
2104
|
+
)
|
|
2105
|
+
else:
|
|
2106
|
+
args["csfincludename"] = None
|
|
2107
|
+
args["csfincludevals"] = None
|
|
2108
|
+
|
|
2109
|
+
# individual mask processing (including overrides)
|
|
2110
|
+
if args["corrmaskincludespec"] is not None:
|
|
2111
|
+
(
|
|
2112
|
+
args["corrmaskincludename"],
|
|
2113
|
+
args["corrmaskincludevals"],
|
|
2114
|
+
) = tide_io.processnamespec(
|
|
2115
|
+
args["corrmaskincludespec"],
|
|
2116
|
+
"Including voxels where ",
|
|
2117
|
+
"in correlation calculations.",
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2120
|
+
if args["initregressorincludespec"] is not None:
|
|
1905
2121
|
(
|
|
1906
|
-
args["
|
|
1907
|
-
args["
|
|
2122
|
+
args["initregressorincludename"],
|
|
2123
|
+
args["initregressorincludevals"],
|
|
1908
2124
|
) = tide_io.processnamespec(
|
|
1909
|
-
args["
|
|
2125
|
+
args["initregressorincludespec"],
|
|
2126
|
+
"Including voxels where ",
|
|
2127
|
+
"in initial regressor calculation.",
|
|
1910
2128
|
)
|
|
1911
2129
|
|
|
1912
|
-
if args["
|
|
2130
|
+
if args["initregressorexcludespec"] is not None:
|
|
1913
2131
|
(
|
|
1914
|
-
args["
|
|
1915
|
-
args["
|
|
2132
|
+
args["initregressorexcludename"],
|
|
2133
|
+
args["initregressorexcludevals"],
|
|
1916
2134
|
) = tide_io.processnamespec(
|
|
1917
|
-
args["
|
|
2135
|
+
args["initregressorexcludespec"],
|
|
1918
2136
|
"Excluding voxels where ",
|
|
1919
|
-
"from
|
|
2137
|
+
"from initial regressor calculation.",
|
|
1920
2138
|
)
|
|
1921
|
-
else:
|
|
1922
|
-
args["globalmeanexcludename"] = None
|
|
1923
|
-
args["globalmeanexcludevals"] = None
|
|
1924
2139
|
|
|
1925
2140
|
if args["refineincludespec"] is not None:
|
|
1926
2141
|
(
|
|
@@ -1937,9 +2152,6 @@ def process_args(inputargs=None):
|
|
|
1937
2152
|
) = tide_io.processnamespec(
|
|
1938
2153
|
args["refineexcludespec"], "Excluding voxels where ", "from refinement."
|
|
1939
2154
|
)
|
|
1940
|
-
else:
|
|
1941
|
-
args["refineexcludename"] = None
|
|
1942
|
-
args["refineexcludevals"] = None
|
|
1943
2155
|
|
|
1944
2156
|
if args["offsetincludespec"] is not None:
|
|
1945
2157
|
(
|
|
@@ -1956,9 +2168,6 @@ def process_args(inputargs=None):
|
|
|
1956
2168
|
) = tide_io.processnamespec(
|
|
1957
2169
|
args["offsetexcludespec"], "Excluding voxels where ", "from offset calculation."
|
|
1958
2170
|
)
|
|
1959
|
-
else:
|
|
1960
|
-
args["offsetexcludename"] = None
|
|
1961
|
-
args["offsetexcludevals"] = None
|
|
1962
2171
|
|
|
1963
2172
|
# motion processing
|
|
1964
2173
|
if args["motionfilespec"] is not None:
|
|
@@ -1971,25 +2180,35 @@ def process_args(inputargs=None):
|
|
|
1971
2180
|
# process analysis modes
|
|
1972
2181
|
if args["delaymapping"]:
|
|
1973
2182
|
LGR.warning('Using "delaymapping" analysis mode. Overriding any affected arguments.')
|
|
1974
|
-
|
|
1975
|
-
|
|
2183
|
+
if args["passes"] == DEFAULT_PASSES:
|
|
2184
|
+
args["passes"] = DEFAULT_DELAYMAPPING_PASSES
|
|
2185
|
+
if args["despeckle_passes"] == DEFAULT_DESPECKLE_PASSES:
|
|
2186
|
+
args["despeckle_passes"] = DEFAULT_DELAYMAPPING_DESPECKLE_PASSES
|
|
2187
|
+
if args["gausssigma"] == DEFAULT_SPATIALFILT:
|
|
2188
|
+
args["gausssigma"] = DEFAULT_DELAYMAPPING_SPATIALFILT
|
|
1976
2189
|
pf.setifnotset(args, "lagmin", DEFAULT_DELAYMAPPING_LAGMIN)
|
|
1977
2190
|
pf.setifnotset(args, "lagmax", DEFAULT_DELAYMAPPING_LAGMAX)
|
|
1978
2191
|
args["refineoffset"] = True
|
|
2192
|
+
args["refinedelay"] = True
|
|
1979
2193
|
args["outputlevel"] = "normal"
|
|
1980
|
-
pf.setifnotset(args, "
|
|
2194
|
+
pf.setifnotset(args, "dolinfitfilt", True)
|
|
1981
2195
|
|
|
1982
2196
|
if args["denoising"]:
|
|
1983
2197
|
LGR.warning('Using "denoising" analysis mode. Overriding any affected arguments.')
|
|
1984
|
-
|
|
1985
|
-
|
|
2198
|
+
if args["passes"] == DEFAULT_PASSES:
|
|
2199
|
+
args["passes"] = DEFAULT_DENOISING_PASSES
|
|
2200
|
+
if args["despeckle_passes"] == DEFAULT_DESPECKLE_PASSES:
|
|
2201
|
+
args["despeckle_passes"] = DEFAULT_DENOISING_DESPECKLE_PASSES
|
|
2202
|
+
if args["gausssigma"] == DEFAULT_SPATIALFILT:
|
|
2203
|
+
args["gausssigma"] = DEFAULT_DENOISING_SPATIALFILT
|
|
2204
|
+
if args["peakfittype"] == DEFAULT_PEAKFIT_TYPE:
|
|
2205
|
+
args["peakfittype"] = DEFAULT_DENOISING_PEAKFITTYPE
|
|
1986
2206
|
pf.setifnotset(args, "lagmin", DEFAULT_DENOISING_LAGMIN)
|
|
1987
2207
|
pf.setifnotset(args, "lagmax", DEFAULT_DENOISING_LAGMAX)
|
|
1988
|
-
pf.setifnotset(args, "peakfittype", DEFAULT_DENOISING_PEAKFITTYPE)
|
|
1989
|
-
pf.setifnotset(args, "gausssigma", DEFAULT_DENOISING_SPATIALFILT)
|
|
1990
2208
|
args["refineoffset"] = True
|
|
2209
|
+
args["refinedelay"] = True
|
|
1991
2210
|
args["zerooutbadfit"] = False
|
|
1992
|
-
|
|
2211
|
+
args["dolinfitfilt"] = True
|
|
1993
2212
|
|
|
1994
2213
|
if args["docvrmap"]:
|
|
1995
2214
|
LGR.warning('Using "CVR" analysis mode. Overriding any affected arguments.')
|
|
@@ -2001,22 +2220,24 @@ def process_args(inputargs=None):
|
|
|
2001
2220
|
DEFAULT_CVRMAPPING_FILTER_LOWERPASS,
|
|
2002
2221
|
DEFAULT_CVRMAPPING_FILTER_UPPERPASS,
|
|
2003
2222
|
)
|
|
2004
|
-
|
|
2005
|
-
|
|
2223
|
+
if args["despeckle_passes"] == DEFAULT_DESPECKLE_PASSES:
|
|
2224
|
+
args["despeckle_passes"] = DEFAULT_CVRMAPPING_DESPECKLE_PASSES
|
|
2225
|
+
if args["filterband"] == pf.DEFAULT_FILTERBAND:
|
|
2226
|
+
args["filterband"] = "None"
|
|
2006
2227
|
pf.setifnotset(args, "lagmin", DEFAULT_CVRMAPPING_LAGMIN)
|
|
2007
2228
|
pf.setifnotset(args, "lagmax", DEFAULT_CVRMAPPING_LAGMAX)
|
|
2008
2229
|
args["preservefiltering"] = True
|
|
2009
2230
|
args["passes"] = 1
|
|
2010
2231
|
args["outputlevel"] = "min"
|
|
2011
|
-
args["
|
|
2232
|
+
args["dolinfitfilt"] = False
|
|
2012
2233
|
|
|
2013
|
-
if args["
|
|
2234
|
+
if args["initregressorpreselect"]:
|
|
2014
2235
|
LGR.warning('Using "globalpreselect" analysis mode. Overriding any affected arguments.')
|
|
2015
2236
|
args["passes"] = 1
|
|
2016
2237
|
args["despeckle_passes"] = 0
|
|
2017
2238
|
args["refinedespeckle"] = False
|
|
2018
2239
|
args["outputlevel"] = "normal"
|
|
2019
|
-
pf.setifnotset(args, "
|
|
2240
|
+
pf.setifnotset(args, "dolinfitfilt", False)
|
|
2020
2241
|
args["saveintermediatemaps"] = False
|
|
2021
2242
|
|
|
2022
2243
|
# configure the filter
|
|
@@ -2036,6 +2257,7 @@ def process_args(inputargs=None):
|
|
|
2036
2257
|
LGR.warning('Using "nirs" macro. Overriding any affected arguments.')
|
|
2037
2258
|
args["nothresh"] = True
|
|
2038
2259
|
pf.setifnotset(args, "preservefiltering", False)
|
|
2260
|
+
args["dataiszeromean"] = True
|
|
2039
2261
|
args["refineprenorm"] = "var"
|
|
2040
2262
|
args["ampthresh"] = 0.7
|
|
2041
2263
|
args["ampthreshfromsig"] = False
|
|
@@ -2053,54 +2275,67 @@ def process_args(inputargs=None):
|
|
|
2053
2275
|
args["savecorrtimes"] = False
|
|
2054
2276
|
args["savelagregressors"] = False
|
|
2055
2277
|
args["savedespecklemasks"] = False
|
|
2056
|
-
args["
|
|
2057
|
-
args["
|
|
2278
|
+
args["saveminimumsLFOfiltfiles"] = False
|
|
2279
|
+
args["savenormalsLFOfiltfiles"] = False
|
|
2058
2280
|
args["savemovingsignal"] = False
|
|
2059
|
-
args["
|
|
2281
|
+
args["saveallsLFOfiltfiles"] = False
|
|
2060
2282
|
elif args["outputlevel"] == "less":
|
|
2061
2283
|
args["saveconfoundfiltered"] = False
|
|
2062
2284
|
args["savegaussout"] = False
|
|
2063
2285
|
args["savecorrtimes"] = False
|
|
2064
2286
|
args["savelagregressors"] = False
|
|
2065
2287
|
args["savedespecklemasks"] = False
|
|
2066
|
-
args["
|
|
2067
|
-
args["
|
|
2288
|
+
args["saveminimumsLFOfiltfiles"] = True
|
|
2289
|
+
args["savenormalsLFOfiltfiles"] = False
|
|
2068
2290
|
args["savemovingsignal"] = False
|
|
2069
|
-
args["
|
|
2291
|
+
args["saveallsLFOfiltfiles"] = False
|
|
2070
2292
|
elif args["outputlevel"] == "normal":
|
|
2071
2293
|
args["saveconfoundfiltered"] = False
|
|
2072
2294
|
args["savegaussout"] = False
|
|
2073
2295
|
args["savecorrtimes"] = False
|
|
2074
2296
|
args["savelagregressors"] = False
|
|
2075
2297
|
args["savedespecklemasks"] = False
|
|
2076
|
-
args["
|
|
2077
|
-
args["
|
|
2298
|
+
args["saveminimumsLFOfiltfiles"] = True
|
|
2299
|
+
args["savenormalsLFOfiltfiles"] = True
|
|
2078
2300
|
args["savemovingsignal"] = False
|
|
2079
|
-
args["
|
|
2301
|
+
args["saveallsLFOfiltfiles"] = False
|
|
2080
2302
|
elif args["outputlevel"] == "more":
|
|
2081
2303
|
args["saveconfoundfiltered"] = False
|
|
2082
2304
|
args["savegaussout"] = False
|
|
2083
2305
|
args["savecorrtimes"] = False
|
|
2084
2306
|
args["savelagregressors"] = True
|
|
2085
2307
|
args["savedespecklemasks"] = False
|
|
2086
|
-
args["
|
|
2087
|
-
args["
|
|
2308
|
+
args["saveminimumsLFOfiltfiles"] = True
|
|
2309
|
+
args["savenormalsLFOfiltfiles"] = True
|
|
2088
2310
|
args["savemovingsignal"] = True
|
|
2089
|
-
args["
|
|
2311
|
+
args["saveallsLFOfiltfiles"] = False
|
|
2090
2312
|
elif args["outputlevel"] == "max":
|
|
2091
2313
|
args["saveconfoundfiltered"] = True
|
|
2092
2314
|
args["savegaussout"] = True
|
|
2093
2315
|
args["savecorrtimes"] = True
|
|
2094
2316
|
args["savelagregressors"] = True
|
|
2095
2317
|
args["savedespecklemasks"] = True
|
|
2096
|
-
args["
|
|
2097
|
-
args["
|
|
2318
|
+
args["saveminimumsLFOfiltfiles"] = True
|
|
2319
|
+
args["savenormalsLFOfiltfiles"] = True
|
|
2098
2320
|
args["savemovingsignal"] = True
|
|
2099
|
-
args["
|
|
2321
|
+
args["saveallsLFOfiltfiles"] = True
|
|
2100
2322
|
else:
|
|
2101
2323
|
print(f"illegal output level {args['outputlevel']}")
|
|
2102
2324
|
sys.exit()
|
|
2103
2325
|
|
|
2326
|
+
# make the pass options dictionary
|
|
2327
|
+
args["passoptions"] = [
|
|
2328
|
+
{
|
|
2329
|
+
"similaritymetric": "riptide",
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
"similaritymetric": "correlation",
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"similaritymetric": "correlation",
|
|
2336
|
+
},
|
|
2337
|
+
]
|
|
2338
|
+
|
|
2104
2339
|
# dispersion calculation
|
|
2105
2340
|
args["dispersioncalc_lower"] = args["lagmin"]
|
|
2106
2341
|
args["dispersioncalc_upper"] = args["lagmax"]
|
|
@@ -2116,14 +2351,14 @@ def process_args(inputargs=None):
|
|
|
2116
2351
|
args["territorymapname"],
|
|
2117
2352
|
args["territorymapincludevals"],
|
|
2118
2353
|
) = tide_io.processnamespec(
|
|
2119
|
-
args["territorymap"], "Including voxels where ", "in
|
|
2354
|
+
args["territorymap"], "Including voxels where ", "in initial regressor calculation."
|
|
2120
2355
|
)
|
|
2121
2356
|
else:
|
|
2122
2357
|
args["territorymapname"] = None
|
|
2123
2358
|
args["territorymapincludevals"] = None
|
|
2124
2359
|
|
|
2125
|
-
# this is new enough to do retrospective
|
|
2126
|
-
args["
|
|
2360
|
+
# this is new enough to do retrospective regression filtering
|
|
2361
|
+
args["retroregresscompatible"] = True
|
|
2127
2362
|
|
|
2128
2363
|
LGR.debug("\nafter postprocessing\n{}".format(args))
|
|
2129
2364
|
|