rapidtide 3.0.6__py3-none-any.whl → 3.0.7.1__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.
- rapidtide/RapidtideDataset.py +17 -0
- rapidtide/_version.py +3 -3
- rapidtide/correlate.py +25 -6
- rapidtide/data/examples/src/testfmri +15 -0
- rapidtide/data/examples/src/testhappy +56 -60
- rapidtide/data/examples/src/testsimdata +45 -28
- rapidtide/happy_supportfuncs.py +599 -107
- rapidtide/resample.py +24 -14
- rapidtide/tests/test_congrid.py +68 -79
- rapidtide/voxelData.py +17 -3
- rapidtide/workflows/cleanregressor.py +3 -2
- rapidtide/workflows/happy.py +59 -2
- rapidtide/workflows/happy_parser.py +36 -0
- rapidtide/workflows/rapidtide.py +24 -7
- rapidtide/workflows/rapidtide_parser.py +7 -0
- rapidtide/workflows/retroregress.py +21 -3
- rapidtide/workflows/showarbcorr.py +19 -6
- rapidtide/workflows/simdata.py +149 -65
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/METADATA +1 -1
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/RECORD +24 -24
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/WHEEL +1 -1
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/entry_points.txt +0 -0
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/licenses/LICENSE +0 -0
- {rapidtide-3.0.6.dist-info → rapidtide-3.0.7.1.dist-info}/top_level.txt +0 -0
rapidtide/RapidtideDataset.py
CHANGED
|
@@ -903,6 +903,23 @@ class RapidtideDataset:
|
|
|
903
903
|
print("using ", self.fileroot + "meanvalue.nii.gz", " as background")
|
|
904
904
|
# allloadedmaps.append('anatomic')
|
|
905
905
|
return True
|
|
906
|
+
elif os.path.isfile(self.fileroot + "desc-unfiltmean_map.nii.gz"):
|
|
907
|
+
thepath, thebase = os.path.split(self.fileroot)
|
|
908
|
+
self.overlays["anatomic"] = Overlay(
|
|
909
|
+
"anatomic",
|
|
910
|
+
self.fileroot + "desc-unfiltmean_map.nii.gz",
|
|
911
|
+
thebase,
|
|
912
|
+
init_LUT=self.init_LUT,
|
|
913
|
+
verbose=self.verbose,
|
|
914
|
+
)
|
|
915
|
+
if self.verbose > 1:
|
|
916
|
+
print(
|
|
917
|
+
"using ",
|
|
918
|
+
self.fileroot + "desc-unfiltmean_map.nii.gz",
|
|
919
|
+
" as background",
|
|
920
|
+
)
|
|
921
|
+
# allloadedmaps.append('anatomic')
|
|
922
|
+
return True
|
|
906
923
|
elif os.path.isfile(self.fileroot + "desc-mean_map.nii.gz"):
|
|
907
924
|
thepath, thebase = os.path.split(self.fileroot)
|
|
908
925
|
self.overlays["anatomic"] = Overlay(
|
rapidtide/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-06-16T15:12:43-0400",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "3.0.
|
|
14
|
+
"full-revisionid": "6dead8e554dd0464bdfc65de24889374508f920d",
|
|
15
|
+
"version": "3.0.7.1"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
rapidtide/correlate.py
CHANGED
|
@@ -761,18 +761,14 @@ class AliasedCorrelator:
|
|
|
761
761
|
return corrfunc
|
|
762
762
|
|
|
763
763
|
|
|
764
|
-
def
|
|
764
|
+
def matchsamplerates(
|
|
765
765
|
input1,
|
|
766
766
|
Fs1,
|
|
767
767
|
input2,
|
|
768
768
|
Fs2,
|
|
769
|
-
start1=0.0,
|
|
770
|
-
start2=0.0,
|
|
771
|
-
windowfunc="hamming",
|
|
772
769
|
method="univariate",
|
|
773
770
|
debug=False,
|
|
774
771
|
):
|
|
775
|
-
"""Calculate something."""
|
|
776
772
|
if Fs1 > Fs2:
|
|
777
773
|
corrFs = Fs1
|
|
778
774
|
matchedinput1 = input1
|
|
@@ -782,9 +778,32 @@ def arbcorr(
|
|
|
782
778
|
matchedinput1 = tide_resample.upsample(input1, Fs1, corrFs, method=method, debug=debug)
|
|
783
779
|
matchedinput2 = input2
|
|
784
780
|
else:
|
|
785
|
-
corrFs =
|
|
781
|
+
corrFs = Fs2
|
|
786
782
|
matchedinput1 = input1
|
|
787
783
|
matchedinput2 = input2
|
|
784
|
+
return matchedinput1, matchedinput2, corrFs
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
def arbcorr(
|
|
788
|
+
input1,
|
|
789
|
+
Fs1,
|
|
790
|
+
input2,
|
|
791
|
+
Fs2,
|
|
792
|
+
start1=0.0,
|
|
793
|
+
start2=0.0,
|
|
794
|
+
windowfunc="hamming",
|
|
795
|
+
method="univariate",
|
|
796
|
+
debug=False,
|
|
797
|
+
):
|
|
798
|
+
# upsample to the higher frequency of the two
|
|
799
|
+
matchedinput1, matchedinput2, corrFs = matchsamplerates(
|
|
800
|
+
input1,
|
|
801
|
+
Fs1,
|
|
802
|
+
input2,
|
|
803
|
+
Fs2,
|
|
804
|
+
method=method,
|
|
805
|
+
debug=debug,
|
|
806
|
+
)
|
|
788
807
|
norm1 = tide_math.corrnormalize(matchedinput1, detrendorder=1, windowfunc=windowfunc)
|
|
789
808
|
norm2 = tide_math.corrnormalize(matchedinput2, detrendorder=1, windowfunc=windowfunc)
|
|
790
809
|
thexcorr_y = signal.fftconvolve(norm1, norm2[::-1], mode="full")
|
|
@@ -6,6 +6,7 @@ rapidtide \
|
|
|
6
6
|
--searchrange -5 20 \
|
|
7
7
|
--simcalcrange 50 -1 \
|
|
8
8
|
--outputlevel more \
|
|
9
|
+
--sLFOfiltmask \
|
|
9
10
|
--graymattermask sub-RAPIDTIDETEST_synthseg.nii.gz:SSEG_GRAY \
|
|
10
11
|
--brainmask sub-RAPIDTIDETEST_brainmask.nii.gz \
|
|
11
12
|
--whitemattermask sub-RAPIDTIDETEST_synthseg.nii.gz:SSEG_WHITE \
|
|
@@ -13,3 +14,17 @@ rapidtide \
|
|
|
13
14
|
--cleanrefined \
|
|
14
15
|
sub-RAPIDTIDETEST.nii.gz \
|
|
15
16
|
../dst/sub-RAPIDTIDETEST
|
|
17
|
+
|
|
18
|
+
rapidtide \
|
|
19
|
+
--spatialfilt -1 \
|
|
20
|
+
--nprocs -1 \
|
|
21
|
+
--searchrange -5 20 \
|
|
22
|
+
--simcalcrange 50 -1 \
|
|
23
|
+
--outputlevel more \
|
|
24
|
+
--graymattermask sub-RAPIDTIDETEST_synthseg.nii.gz:SSEG_GRAY \
|
|
25
|
+
--brainmask sub-RAPIDTIDETEST_brainmask.nii.gz \
|
|
26
|
+
--whitemattermask sub-RAPIDTIDETEST_synthseg.nii.gz:SSEG_WHITE \
|
|
27
|
+
--csfmask sub-RAPIDTIDETEST_synthseg.nii.gz:SSEG_CSF \
|
|
28
|
+
--cleanrefined \
|
|
29
|
+
sub-RAPIDTIDETEST.nii.gz \
|
|
30
|
+
../dst/sub-RAPIDTIDETEST_nosLFOfiltmask
|
|
@@ -1,81 +1,77 @@
|
|
|
1
1
|
#!/bin/csh -f
|
|
2
2
|
|
|
3
3
|
#happy \
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
# --
|
|
8
|
-
# --infotag tag1 value1 \
|
|
9
|
-
# --infotag tag2 value2 \
|
|
10
|
-
# --model model_revised
|
|
4
|
+
# sub-HAPPYTEST.nii.gz \
|
|
5
|
+
# sub-HAPPYTEST.json \
|
|
6
|
+
# ../dst/happy_vanilla \
|
|
7
|
+
# --nprocs 1
|
|
11
8
|
|
|
12
9
|
#happy \
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
#--spatialglm --aliasedcorrelation
|
|
19
|
-
|
|
10
|
+
# sub-HAPPYTEST.nii.gz \
|
|
11
|
+
# sub-HAPPYTEST.json \
|
|
12
|
+
# --mpphaseproject \
|
|
13
|
+
# ../dst/happy_mpphaseproj \
|
|
14
|
+
# --nprocs -1
|
|
20
15
|
|
|
21
16
|
#happy \
|
|
22
17
|
# sub-HAPPYTEST.nii.gz \
|
|
23
18
|
# sub-HAPPYTEST.json \
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
# --
|
|
27
|
-
|
|
28
|
-
# --model model_revised
|
|
29
|
-
#
|
|
19
|
+
# --mpdetrend \
|
|
20
|
+
# ../dst/happy_mpdetrend \
|
|
21
|
+
# --nprocs -1
|
|
22
|
+
|
|
30
23
|
#happy \
|
|
31
24
|
# sub-HAPPYTEST.nii.gz \
|
|
32
25
|
# sub-HAPPYTEST.json \
|
|
33
|
-
#
|
|
34
|
-
# --
|
|
35
|
-
#
|
|
36
|
-
# --
|
|
37
|
-
# --model model_revised
|
|
26
|
+
# --mpphaseproject \
|
|
27
|
+
# --mpdetrend \
|
|
28
|
+
# ../dst/happy_mpdetrend_mpphaseproj \
|
|
29
|
+
# --nprocs -1
|
|
38
30
|
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
#--outputbins=40 \
|
|
46
|
-
#--gridbins=3.5 \
|
|
47
|
-
#--stdfreq=20.0 \
|
|
48
|
-
#--estmask=happytestvesselmask.nii.gz \
|
|
49
|
-
#--minhr=46 \
|
|
50
|
-
#--maxhr=131.2 \
|
|
51
|
-
#--minhrfilt=45.5 \
|
|
52
|
-
#--maxhrfilt=800.0 \
|
|
53
|
-
#--envcutoff=0.45 \
|
|
54
|
-
#--notchwidth=1.25 \
|
|
55
|
-
#--cardiacfile=happytestpleth.txt \
|
|
56
|
-
#--cardiacfreq=20.0 \
|
|
57
|
-
#--cardiacstart=0.0 \
|
|
58
|
-
#--aliasedcorrelation \
|
|
59
|
-
#--increaseoutputlevel \
|
|
60
|
-
#--increaseoutputlevel \
|
|
61
|
-
#--decreaseoutputlevel \
|
|
62
|
-
#--dodlfilter
|
|
31
|
+
#happy \
|
|
32
|
+
# sub-HAPPYTEST.nii.gz \
|
|
33
|
+
# sub-HAPPYTEST.json \
|
|
34
|
+
# --prefillcongrid \
|
|
35
|
+
# ../dst/happy_vanilla_prefill \
|
|
36
|
+
# --nprocs 1
|
|
63
37
|
|
|
38
|
+
#happy \
|
|
39
|
+
# sub-HAPPYTEST.nii.gz \
|
|
40
|
+
# sub-HAPPYTEST.json \
|
|
41
|
+
# --prefillcongrid \
|
|
42
|
+
# --mpphaseproject \
|
|
43
|
+
# ../dst/happy_mpphaseproj_prefill \
|
|
44
|
+
# --nprocs -1
|
|
64
45
|
|
|
65
|
-
happy \
|
|
66
|
-
sub-HAPPYTEST.nii.gz \
|
|
67
|
-
sub-HAPPYTEST.json \
|
|
68
|
-
|
|
69
|
-
--
|
|
46
|
+
#happy \
|
|
47
|
+
# sub-HAPPYTEST.nii.gz \
|
|
48
|
+
# sub-HAPPYTEST.json \
|
|
49
|
+
# --prefillcongrid \
|
|
50
|
+
# --mpdetrend \
|
|
51
|
+
# ../dst/happy_mpdetrend_prefill \
|
|
52
|
+
# --nprocs -1
|
|
70
53
|
|
|
71
54
|
#happy \
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
55
|
+
# sub-HAPPYTEST.nii.gz \
|
|
56
|
+
# sub-HAPPYTEST.json \
|
|
57
|
+
# --prefillcongrid \
|
|
58
|
+
# --mpphaseproject \
|
|
59
|
+
# --mpdetrend \
|
|
60
|
+
# ../dst/happy_mpdetrend_mpphaseproj_prefill \
|
|
61
|
+
# --nprocs -1
|
|
76
62
|
|
|
77
63
|
#happy \
|
|
78
64
|
#sub-HAPPYTEST.nii.gz \
|
|
79
65
|
#sub-HAPPYTEST.json \
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
#--mpphaseproject \
|
|
67
|
+
#--mpdetrend \
|
|
68
|
+
#--nocongridcache \
|
|
69
|
+
#../dst/happy_mpdetrend_mpphaseproj_nocache \
|
|
70
|
+
#--nprocs -1
|
|
71
|
+
|
|
72
|
+
happy \
|
|
73
|
+
sub-HAPPYTEST.nii.gz \
|
|
74
|
+
sub-HAPPYTEST.json \
|
|
75
|
+
../dst/happy_newdefaults \
|
|
76
|
+
--aliasedcorrelation \
|
|
77
|
+
--nprocs -1
|
|
@@ -1,36 +1,53 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
+
#rapidtide \
|
|
4
|
+
# --spatialfilt -1 \
|
|
5
|
+
# --nprocs -1 \
|
|
6
|
+
# --searchrange -5 20 \
|
|
7
|
+
# --simcalcrange 50 -1 \
|
|
8
|
+
# --outputlevel more \
|
|
9
|
+
# --nofitfilt \
|
|
10
|
+
# --corrtype linear \
|
|
11
|
+
# sub-RAPIDTIDETEST.nii.gz \
|
|
12
|
+
# ../dst/sub-RAPIDTIDETEST
|
|
13
|
+
|
|
14
|
+
simdata \
|
|
15
|
+
1.5 \
|
|
16
|
+
260 \
|
|
17
|
+
../dst/sub-RAPIDTIDETEST_desc-unfiltmean_map.nii.gz \
|
|
18
|
+
../dst/simulatedfmri_vn05 \
|
|
19
|
+
--lfopctfile ../dst/sub-RAPIDTIDETEST_desc-maxcorr_map.nii.gz \
|
|
20
|
+
--lfolagfile ../dst/sub-RAPIDTIDETEST_desc-maxtimerefined_map.nii.gz \
|
|
21
|
+
--lforegressor ../dst/sub-RAPIDTIDETEST_desc-movingregressor_timeseries.json:pass3 \
|
|
22
|
+
--voxelnoiselevel 5.0
|
|
23
|
+
|
|
3
24
|
rapidtide \
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
../dst/sub-RAPIDTIDETEST
|
|
25
|
+
--spatialfilt -1 \
|
|
26
|
+
--nprocs -1 \
|
|
27
|
+
--searchrange -5 20 \
|
|
28
|
+
--simcalcrange 50 -1 \
|
|
29
|
+
--outputlevel more \
|
|
30
|
+
--nofitfilt \
|
|
31
|
+
--corrtype linear \
|
|
32
|
+
../dst/simulatedfmri_vn05.nii.gz \
|
|
33
|
+
../dst/simrapidtide_vn05
|
|
14
34
|
|
|
15
35
|
simdata \
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
../dst/
|
|
19
|
-
|
|
20
|
-
--
|
|
21
|
-
--lfolagfile ../dst/sub-RAPIDTIDETEST_desc-
|
|
36
|
+
1.5 \
|
|
37
|
+
260 \
|
|
38
|
+
../dst/sub-RAPIDTIDETEST_desc-unfiltmean_map.nii.gz \
|
|
39
|
+
../dst/simulatedfmri_sigfrac \
|
|
40
|
+
--lfosignalfraction ../dst/sub-RAPIDTIDETEST_desc-lfofilterInbandVarianceChange_map.nii.gz \
|
|
41
|
+
--lfolagfile ../dst/sub-RAPIDTIDETEST_desc-maxtimerefined_map.nii.gz \
|
|
22
42
|
--lforegressor ../dst/sub-RAPIDTIDETEST_desc-movingregressor_timeseries.json:pass3
|
|
23
43
|
|
|
24
44
|
rapidtide \
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
../dst/simulatedfmri.nii.gz \
|
|
35
|
-
../dst/simrapidtide
|
|
36
|
-
|
|
45
|
+
--spatialfilt -1 \
|
|
46
|
+
--nprocs -1 \
|
|
47
|
+
--searchrange -5 20 \
|
|
48
|
+
--simcalcrange 50 -1 \
|
|
49
|
+
--outputlevel more \
|
|
50
|
+
--nofitfilt \
|
|
51
|
+
--corrtype linear \
|
|
52
|
+
../dst/simulatedfmri_sigfrac.nii.gz \
|
|
53
|
+
../dst/simrapidtide_sigfrac
|