rapidtide 3.0a12__py3-none-any.whl → 3.0a13__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.
Files changed (62) hide show
  1. cloud/gmscalc-HCPYA +1 -1
  2. cloud/rapidtide-HCPYA +3 -3
  3. rapidtide/Colortables.py +10 -10
  4. rapidtide/DerivativeDelay.py +211 -0
  5. rapidtide/{Refiner.py → RegressorRefiner.py} +1 -1
  6. rapidtide/__init__.py +2 -1
  7. rapidtide/_version.py +1 -1
  8. rapidtide/data/examples/src/test_mlregressallt.py +32 -17
  9. rapidtide/data/examples/src/testalign +1 -1
  10. rapidtide/data/examples/src/testboth +1 -1
  11. rapidtide/data/examples/src/testcifti +11 -0
  12. rapidtide/data/examples/src/testdelayvar +13 -0
  13. rapidtide/data/examples/src/testfmri +1 -0
  14. rapidtide/data/examples/src/testglmfilt +8 -6
  15. rapidtide/data/examples/src/testhappy +1 -1
  16. rapidtide/data/examples/src/testnewrefine +11 -11
  17. rapidtide/data/examples/src/testnoiseamp +2 -2
  18. rapidtide/data/examples/src/testretro +16 -7
  19. rapidtide/data/examples/src/testretrolagtcs +1 -1
  20. rapidtide/dlfilter.py +0 -1
  21. rapidtide/fit.py +41 -9
  22. rapidtide/happy_supportfuncs.py +5 -0
  23. rapidtide/io.py +13 -2
  24. rapidtide/{glmpass.py → linfitfiltpass.py} +21 -19
  25. rapidtide/refinedelay.py +96 -58
  26. rapidtide/resample.py +3 -0
  27. rapidtide/scripts/{retroglm.py → delayvar.py} +2 -2
  28. rapidtide/scripts/{glmfilt.py → linfitfilt.py} +2 -2
  29. rapidtide/scripts/retroregress.py +28 -0
  30. rapidtide/scripts/stupidramtricks.py +9 -7
  31. rapidtide/simfuncfit.py +1 -1
  32. rapidtide/tests/cleanposttest +21 -0
  33. rapidtide/tests/test_delayestimation.py +3 -3
  34. rapidtide/tests/test_fastresampler.py +1 -2
  35. rapidtide/tests/test_fullrunhappy_v1.py +1 -1
  36. rapidtide/tests/test_fullrunhappy_v2.py +1 -1
  37. rapidtide/tests/test_fullrunrapidtide_v1.py +2 -2
  38. rapidtide/tests/test_fullrunrapidtide_v3.py +1 -1
  39. rapidtide/tests/test_fullrunrapidtide_v5.py +1 -1
  40. rapidtide/tests/test_fullrunrapidtide_v6.py +11 -11
  41. rapidtide/tests/{test_glmpass.py → test_linfitfiltpass.py} +9 -9
  42. rapidtide/tests/test_motionregress.py +3 -3
  43. rapidtide/tests/test_refinedelay.py +12 -12
  44. rapidtide/tidepoolTemplate_alt_qt6.py +172 -45
  45. rapidtide/tidepoolTemplate_big_qt6.py +196 -53
  46. rapidtide/tidepoolTemplate_qt6.py +150 -39
  47. rapidtide/workflows/delayvar.py +1048 -0
  48. rapidtide/workflows/happy.py +37 -11
  49. rapidtide/workflows/happy_parser.py +4 -4
  50. rapidtide/workflows/{glmfilt.py → linfitfilt.py} +4 -4
  51. rapidtide/workflows/rapidtide.py +235 -171
  52. rapidtide/workflows/rapidtide_parser.py +103 -86
  53. rapidtide/workflows/{glmfrommaps.py → regressfrommaps.py} +28 -26
  54. rapidtide/workflows/retrolagtcs.py +12 -12
  55. rapidtide/workflows/{retroglm.py → retroregress.py} +158 -141
  56. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info}/METADATA +3 -2
  57. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info}/RECORD +61 -56
  58. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info}/WHEEL +1 -1
  59. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info}/entry_points.txt +3 -2
  60. rapidtide/data/examples/src/testoutputsize +0 -45
  61. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info/licenses}/LICENSE +0 -0
  62. {rapidtide-3.0a12.dist-info → rapidtide-3.0a13.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ #
4
+ # Copyright 2016-2024 Blaise Frederick
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+ import rapidtide.workflows.parser_funcs as pf
20
+ import rapidtide.workflows.retroregress as theworkflow
21
+
22
+
23
+ def entrypoint():
24
+ pf.generic_init(theworkflow._get_parser, theworkflow.retroregress)
25
+
26
+
27
+ if __name__ == "__main__":
28
+ entrypoint()
@@ -29,7 +29,7 @@ import rapidtide.workflows.parser_funcs as pf
29
29
 
30
30
  def _get_parser():
31
31
  """
32
- Argument parser for glmfilt
32
+ Argument parser for stupidramtricks
33
33
  """
34
34
  parser = argparse.ArgumentParser(
35
35
  prog="stupidramtricks",
@@ -141,7 +141,9 @@ def stupidramtricks(args):
141
141
  fmridata, fmridata_shm = tide_util.numpy2shared(
142
142
  fmridata, rt_floatset, name=f"fmridata_{args.pid}"
143
143
  )
144
- glmmean, glmmean_shm = tide_util.allocshared(internalvalidspaceshape, rt_outfloatset)
144
+ sLFOfitmean, sLFOfitmean_shm = tide_util.allocshared(
145
+ internalvalidspaceshape, rt_outfloatset
146
+ )
145
147
  rvalue, rvalue_shm = tide_util.allocshared(internalvalidspaceshape, rt_outfloatset)
146
148
  r2value, r2value_shm = tide_util.allocshared(internalvalidspaceshape, rt_outfloatset)
147
149
  fitNorm, fitNorm_shm = tide_util.allocshared(internalvalidspaceshapederivs, rt_outfloatset)
@@ -160,7 +162,7 @@ def stupidramtricks(args):
160
162
  else:
161
163
  if args.debug:
162
164
  print("allocating memory")
163
- glmmean = np.zeros(internalvalidspaceshape, dtype=rt_outfloattype)
165
+ sLFOfitmean = np.zeros(internalvalidspaceshape, dtype=rt_outfloattype)
164
166
  rvalue = np.zeros(internalvalidspaceshape, dtype=rt_outfloattype)
165
167
  r2value = np.zeros(internalvalidspaceshape, dtype=rt_outfloattype)
166
168
  fitNorm = np.zeros(internalvalidspaceshapederivs, dtype=rt_outfloattype)
@@ -172,7 +174,7 @@ def stupidramtricks(args):
172
174
 
173
175
  totalbytes = (
174
176
  fmridata.nbytes
175
- + glmmean.nbytes
177
+ + sLFOfitmean.nbytes
176
178
  + rvalue.nbytes
177
179
  + r2value.nbytes
178
180
  + fitNorm.nbytes
@@ -185,7 +187,7 @@ def stupidramtricks(args):
185
187
  thesize, theunit = tide_util.format_bytes(totalbytes)
186
188
  print(f"allocated {thesize:.3f} {theunit} {location}")
187
189
 
188
- """glmderivratios = tide_refinedelay.getderivratios(
190
+ """regressderivratios, regressrvalues = tide_refinedelay.getderivratios(
189
191
  fmri_data_valid,
190
192
  validvoxels,
191
193
  initial_fmri_x,
@@ -195,7 +197,7 @@ def stupidramtricks(args):
195
197
  mode,
196
198
  outputname,
197
199
  oversamptr,
198
- glmmean,
200
+ sLFOfitmean,
199
201
  rvalue,
200
202
  r2value,
201
203
  fitNorm[:, :2],
@@ -212,7 +214,7 @@ def stupidramtricks(args):
212
214
  # clean up shared memory
213
215
  if args.usesharedmem:
214
216
  tide_util.cleanup_shm(fmridata_shm)
215
- tide_util.cleanup_shm(glmmean_shm)
217
+ tide_util.cleanup_shm(sLFOfitmean_shm)
216
218
  tide_util.cleanup_shm(rvalue_shm)
217
219
  tide_util.cleanup_shm(r2value_shm)
218
220
  tide_util.cleanup_shm(fitNorm_shm)
rapidtide/simfuncfit.py CHANGED
@@ -43,7 +43,7 @@ def onesimfuncfit(
43
43
  ):
44
44
  if initiallag is not None:
45
45
  thefitter.setguess(True, maxguess=initiallag)
46
- thefitter.setrange(-despeckle_thresh/2.0, despeckle_thresh/2.0)
46
+ thefitter.setrange(-despeckle_thresh / 2.0, despeckle_thresh / 2.0)
47
47
  else:
48
48
  thefitter.setguess(False)
49
49
 
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ #
3
+ # Copyright 2016-2021 Blaise Frederick
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ #
18
+
19
+ rm tmp/*
20
+ rm testdata/*
21
+ rm .coveragerc.*
@@ -24,8 +24,8 @@ import numpy as np
24
24
 
25
25
  import rapidtide.calcsimfunc as tide_calcsimfunc
26
26
  import rapidtide.filter as tide_filt
27
- import rapidtide.glmpass as tide_glmpass
28
27
  import rapidtide.helper_classes as tide_classes
28
+ import rapidtide.linfitfiltpass as tide_linfitfiltpass
29
29
  import rapidtide.miscmath as tide_math
30
30
  import rapidtide.peakeval as tide_peakeval
31
31
  import rapidtide.resample as tide_resample
@@ -335,7 +335,7 @@ def test_delayestimation(displayplots=False, debug=False):
335
335
  filteredwaveforms[i, :] = theprefilter.apply(Fs, waveforms[i, :])
336
336
 
337
337
  for nprocs in [4, 1]:
338
- voxelsprocessed_glm = tide_glmpass.glmpass(
338
+ voxelsprocessed_regressionfilt = tide_linfitfiltpass.linfitfiltpass(
339
339
  numlocs,
340
340
  waveforms[:, :],
341
341
  threshval,
@@ -366,7 +366,7 @@ def test_delayestimation(displayplots=False, debug=False):
366
366
  ax.legend()
367
367
  plt.show()
368
368
 
369
- print(proctype, "glmpass", np.mean(diffsignal), np.max(np.fabs(diffsignal)))
369
+ print(proctype, "linfitfiltpass", np.mean(diffsignal), np.max(np.fabs(diffsignal)))
370
370
 
371
371
  # clean up shared memory
372
372
  tide_util.cleanup_shm(waveforms_shm)
@@ -23,8 +23,7 @@ import matplotlib.pyplot as plt
23
23
  import numpy as np
24
24
 
25
25
  from rapidtide.resample import FastResampler, FastResamplerFromFile
26
- from rapidtide.tests.utils import mse
27
- from rapidtide.tests.utils import get_test_temp_path
26
+ from rapidtide.tests.utils import get_test_temp_path, mse
28
27
 
29
28
 
30
29
  def test_FastResampler(debug=False):
@@ -33,7 +33,7 @@ def test_fullrunhappy_v1(debug=False, displayplots=False):
33
33
  os.path.join(get_test_temp_path(), "happyout1"),
34
34
  "--mklthreads",
35
35
  "-1",
36
- "--spatialglm",
36
+ "--spatialregression",
37
37
  "--model",
38
38
  "model_revised",
39
39
  ]
@@ -40,7 +40,7 @@ def test_fullrunhappy_v2(debug=False, displayplots=False):
40
40
  "--model",
41
41
  "model_revised",
42
42
  "--fliparteries",
43
- "--temporalglm",
43
+ "--temporalregression",
44
44
  "--cardiacfile",
45
45
  os.path.join(
46
46
  get_examples_path(),
@@ -62,7 +62,7 @@ def test_fullrunrapidtide_v1(debug=False, displayplots=False):
62
62
  "1",
63
63
  "--despecklepasses",
64
64
  "3",
65
- "--noglm",
65
+ "--nodenoise",
66
66
  "--norefinedelay",
67
67
  "--initialdelay",
68
68
  "0.0",
@@ -83,7 +83,7 @@ def test_fullrunrapidtide_v1(debug=False, displayplots=False):
83
83
  "1",
84
84
  "--despecklepasses",
85
85
  "3",
86
- "--noglm",
86
+ "--nodenoise",
87
87
  "--initialdelay",
88
88
  os.path.join(get_test_temp_path(), "sub-RAPIDTIDETEST1_desc-maxtime_map.nii.gz"),
89
89
  ]
@@ -40,7 +40,7 @@ def test_fullrunrapidtide_v3(debug=False, displayplots=False):
40
40
  "pca",
41
41
  "--convergencethresh",
42
42
  "0.5",
43
- "--noglm",
43
+ "--nodenoise",
44
44
  "--nprocs",
45
45
  "-1",
46
46
  "--similaritymetric",
@@ -35,7 +35,7 @@ def test_fullrunrapidtide_v5(debug=False, displayplots=False):
35
35
  "--passes",
36
36
  "2",
37
37
  "--numnull",
38
- "0",
38
+ "10000",
39
39
  "--pickleft",
40
40
  "--norefinedelay",
41
41
  "--refineprenorm",
@@ -24,7 +24,7 @@ import matplotlib as mpl
24
24
  import rapidtide.io as tide_io
25
25
  import rapidtide.workflows.rapidtide as rapidtide_workflow
26
26
  import rapidtide.workflows.rapidtide_parser as rapidtide_parser
27
- import rapidtide.workflows.retroglm as rapidtide_retroglm
27
+ import rapidtide.workflows.retroregress as rapidtide_retroregress
28
28
  from rapidtide.tests.utils import get_examples_path, get_test_temp_path
29
29
 
30
30
 
@@ -44,7 +44,7 @@ def test_fullrunrapidtide_v6(debug=False, displayplots=False):
44
44
  "1",
45
45
  "--despecklepasses",
46
46
  "3",
47
- "--glmderivs",
47
+ "--regressderivs",
48
48
  "0",
49
49
  "--delaypatchthresh",
50
50
  "4.0",
@@ -60,13 +60,13 @@ def test_fullrunrapidtide_v6(debug=False, displayplots=False):
60
60
  os.path.join(get_test_temp_path(), "2deriv"),
61
61
  "--nprocs",
62
62
  "-1",
63
- "--glmderivs",
63
+ "--regressderivs",
64
64
  "2",
65
65
  "--makepseudofile",
66
66
  "--outputlevel",
67
67
  "max",
68
68
  ]
69
- rapidtide_retroglm.retroglm(rapidtide_retroglm.process_args(inputargs=inputargs))
69
+ rapidtide_retroregress.retroregress(rapidtide_retroregress.process_args(inputargs=inputargs))
70
70
 
71
71
  inputargs = [
72
72
  os.path.join(get_examples_path(), "sub-RAPIDTIDETEST.nii.gz"),
@@ -75,14 +75,14 @@ def test_fullrunrapidtide_v6(debug=False, displayplots=False):
75
75
  os.path.join(get_test_temp_path(), "1deriv_refined_corrected"),
76
76
  "--nprocs",
77
77
  "1",
78
- "--glmderivs",
78
+ "--regressderivs",
79
79
  "1",
80
80
  "--makepseudofile",
81
81
  "--outputlevel",
82
82
  "max",
83
83
  "--nofilterwithrefineddelay",
84
84
  ]
85
- rapidtide_retroglm.retroglm(rapidtide_retroglm.process_args(inputargs=inputargs))
85
+ rapidtide_retroregress.retroregress(rapidtide_retroregress.process_args(inputargs=inputargs))
86
86
 
87
87
  inputargs = [
88
88
  os.path.join(get_examples_path(), "sub-RAPIDTIDETEST.nii.gz"),
@@ -91,22 +91,22 @@ def test_fullrunrapidtide_v6(debug=False, displayplots=False):
91
91
  os.path.join(get_test_temp_path(), "concordance"),
92
92
  "--nprocs",
93
93
  "-1",
94
- "--glmderivs",
94
+ "--regressderivs",
95
95
  "0",
96
96
  "--delaypatchthresh",
97
97
  "4.0",
98
98
  "--outputlevel",
99
99
  "max",
100
100
  ]
101
- rapidtide_retroglm.retroglm(rapidtide_retroglm.process_args(inputargs=inputargs))
101
+ rapidtide_retroregress.retroregress(rapidtide_retroregress.process_args(inputargs=inputargs))
102
102
 
103
103
  absthresh = 1e-10
104
104
  msethresh = 1e-12
105
105
  spacetolerance = 1e-3
106
106
  for map in [
107
- "glmderivratios",
108
- "medfiltglmderivratios",
109
- "filteredglmderivratios",
107
+ "regressderivratios",
108
+ "medfiltregressderivratios",
109
+ "filteredregressderivratios",
110
110
  "maxtimerefined",
111
111
  "lfofilterInbandVarianceBefore",
112
112
  "lfofilterInbandVarianceAfter",
@@ -20,7 +20,7 @@ import matplotlib as mpl
20
20
  import matplotlib.pyplot as plt
21
21
  import numpy as np
22
22
 
23
- import rapidtide.glmpass as tide_glmpass
23
+ import rapidtide.linfitfiltpass as tide_linfitfiltpass
24
24
  from rapidtide.tests.utils import mse
25
25
 
26
26
 
@@ -41,7 +41,7 @@ def gen2d(xsize=150, xcycles=11, tsize=200, tcycles=13, mean=10.0):
41
41
  return thearray, xwaves, twaves
42
42
 
43
43
 
44
- def test_glmpass(debug=True, displayplots=False):
44
+ def test_linfitfiltpass(debug=True, displayplots=False):
45
45
  np.random.seed(12345)
46
46
  xsize = 150
47
47
  xcycles = 7
@@ -77,8 +77,8 @@ def test_glmpass(debug=True, displayplots=False):
77
77
  fitcoffs_x = np.zeros((xsize, tsize), dtype=np.float64)
78
78
  fitNorm_x = np.zeros((xsize, tsize), dtype=np.float64)
79
79
 
80
- for confoundglm in [True, False]:
81
- if confoundglm:
80
+ for confoundregress in [True, False]:
81
+ if confoundregress:
82
82
  twaveformrange = np.transpose(twaveforms[:6, :])
83
83
  xwaveformrange = xwaveforms[:, :6]
84
84
  print(f"{twaveformrange.shape=} - {xwaveformrange.shape=}")
@@ -115,9 +115,9 @@ def test_glmpass(debug=True, displayplots=False):
115
115
 
116
116
  if debug:
117
117
  print(
118
- f"confoundglm={confoundglm}, proc by {direction}, {procstring} proc, {maskstatus}"
118
+ f"confoundregress={confoundregress}, proc by {direction}, {procstring} proc, {maskstatus}"
119
119
  )
120
- tide_glmpass.glmpass(
120
+ tide_linfitfiltpass.linfitfiltpass(
121
121
  xsize,
122
122
  testarray,
123
123
  thisthreshval,
@@ -132,7 +132,7 @@ def test_glmpass(debug=True, displayplots=False):
132
132
  showprogressbar=False,
133
133
  procbyvoxel=procbyvoxel,
134
134
  nprocs=nprocs,
135
- confoundglm=confoundglm,
135
+ confoundregress=confoundregress,
136
136
  )
137
137
  if displayplots:
138
138
  plt.figure()
@@ -142,10 +142,10 @@ def test_glmpass(debug=True, displayplots=False):
142
142
  plt.show()
143
143
  if debug:
144
144
  print(f"\tMSE: {mse(datatoremove, targetarray)}\n")
145
- if not confoundglm:
145
+ if not confoundregress:
146
146
  assert mse(datatoremove, targetarray) < 1e-3
147
147
 
148
148
 
149
149
  if __name__ == "__main__":
150
150
  mpl.use("TkAgg")
151
- test_glmpass(debug=True, displayplots=True)
151
+ test_linfitfiltpass(debug=True, displayplots=True)
@@ -21,8 +21,8 @@ import matplotlib.pyplot as plt
21
21
  import numpy as np
22
22
 
23
23
  import rapidtide.fit as tide_fit
24
- import rapidtide.glmpass as tide_glmpass
25
24
  import rapidtide.io as tide_io
25
+ import rapidtide.linfitfiltpass as tide_linfitfiltpass
26
26
  from rapidtide.tests.utils import mse
27
27
 
28
28
 
@@ -132,7 +132,7 @@ def test_motionregress(debug=False, displayplots=False):
132
132
  numprocitems = thedataarray.shape[0]
133
133
  filtereddata = thedataarray * 0.0
134
134
  r2value = np.zeros(numprocitems)
135
- dummy = tide_glmpass.glmpass(
135
+ dummy = tide_linfitfiltpass.linfitfiltpass(
136
136
  numprocitems,
137
137
  thedataarray,
138
138
  None,
@@ -144,7 +144,7 @@ def test_motionregress(debug=False, displayplots=False):
144
144
  None,
145
145
  None,
146
146
  filtereddata,
147
- confoundglm=True,
147
+ confoundregress=True,
148
148
  nprocs=1,
149
149
  showprogressbar=debug,
150
150
  procbyvoxel=True,
@@ -80,7 +80,7 @@ def eval_refinedelay(
80
80
  padtime = sampletime * numpadtrs
81
81
  lagtcgenerator = tide_resample.FastResampler(timeaxis, sLFO, padtime=padtime)
82
82
 
83
- # find the mapping of glm ratios to delays
83
+ # find the mapping of derivative ratios to delays
84
84
  tide_refinedelay.trainratiotooffset(
85
85
  lagtcgenerator,
86
86
  timeaxis,
@@ -135,7 +135,7 @@ def eval_refinedelay(
135
135
 
136
136
  rt_floattype = "float64"
137
137
  rt_floatset = np.float64
138
- glmmean = np.zeros(numlags, dtype=rt_floattype)
138
+ sLFOfitmean = np.zeros(numlags, dtype=rt_floattype)
139
139
  rvalue = np.zeros(numlags, dtype=rt_floattype)
140
140
  r2value = np.zeros(numlags, dtype=rt_floattype)
141
141
  fitNorm = np.zeros((numlags, 2), dtype=rt_floattype)
@@ -144,10 +144,10 @@ def eval_refinedelay(
144
144
  lagtc = np.zeros(internalvalidfmrishape, dtype=rt_floattype)
145
145
  filtereddata = np.zeros(internalvalidfmrishape, dtype=rt_floattype)
146
146
  optiondict = {
147
- "glmthreshval": 0.0,
148
- "saveminimumglmfiles": False,
147
+ "regressfiltthreshval": 0.0,
148
+ "saveminimumsLFOfiltfiles": False,
149
149
  "nprocs_makelaggedtcs": 1,
150
- "nprocs_glm": 1,
150
+ "nprocs_regressionfilt": 1,
151
151
  "mp_chunksize": 1000,
152
152
  "showprogressbar": False,
153
153
  "alwaysmultiproc": False,
@@ -157,7 +157,7 @@ def eval_refinedelay(
157
157
  "textio": False,
158
158
  }
159
159
 
160
- glmderivratios = tide_refinedelay.getderivratios(
160
+ regressderivratios, regressrvalues = tide_refinedelay.getderivratios(
161
161
  fmridata,
162
162
  validvoxels,
163
163
  timeaxis,
@@ -167,7 +167,7 @@ def eval_refinedelay(
167
167
  "glm",
168
168
  "refinedelaytest",
169
169
  sampletime,
170
- glmmean,
170
+ sLFOfitmean,
171
171
  rvalue,
172
172
  r2value,
173
173
  fitNorm[:, :2],
@@ -181,8 +181,8 @@ def eval_refinedelay(
181
181
  debug=debug,
182
182
  )
183
183
 
184
- medfilt, filteredglmderivratios, themad = tide_refinedelay.filterderivratios(
185
- glmderivratios,
184
+ medfilt, filteredregressderivratios, themad = tide_refinedelay.filterderivratios(
185
+ regressderivratios,
186
186
  nativespaceshape,
187
187
  validvoxels,
188
188
  (xdim, ydim, slicedim),
@@ -193,9 +193,9 @@ def eval_refinedelay(
193
193
  debug=debug,
194
194
  )
195
195
 
196
- delayoffset = filteredglmderivratios * 0.0
197
- for i in range(filteredglmderivratios.shape[0]):
198
- delayoffset[i] = tide_refinedelay.ratiotodelay(filteredglmderivratios[i])
196
+ delayoffset = filteredregressderivratios * 0.0
197
+ for i in range(filteredregressderivratios.shape[0]):
198
+ delayoffset[i] = tide_refinedelay.ratiotodelay(filteredregressderivratios[i])
199
199
 
200
200
  # do the tests
201
201
  msethresh = 0.1