Skip to content

Commit 9fe1243

Browse files
committed
FIX: Keep testing script updated
1 parent bbeb265 commit 9fe1243

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

scripts/bold_subcortical.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@
22
from pathlib import Path
33

44

5-
def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, TR=None):
5+
def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, vol_sigma):
66
from nibabies.workflows.bold.alignment import init_subcortical_mni_alignment_wf
77

8-
if TR is None:
9-
# guess TR from header
10-
import nibabel as nb
11-
img = nb.load(bold_file)
12-
assert len(img.shape) > 3, "Not a 4D file"
13-
TR = img.header['pixdim'][4]
14-
15-
wf = init_subcortical_mni_alignment_wf(repetition_time=TR)
8+
wf = init_subcortical_mni_alignment_wf(vol_sigma=vol_sigma)
169
wf.inputs.inputnode.bold_file = bold_file
1710
wf.inputs.inputnode.bold_roi = bold_roi
1811
wf.inputs.inputnode.atlas_roi = bold_atlas_roi
@@ -50,9 +43,10 @@ def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, TR=None):
5043
help="transformation of input BOLD file to MNI space",
5144
)
5245
parser.add_argument(
53-
"--tr",
46+
"--vol-sigma",
5447
type=float,
55-
help="BOLD repetition time. If not provided, NIfTI header information is used",
48+
default=0.8,
49+
help="The sigma for the gaussian volume smoothing kernel, in mm",
5650
)
5751
parser.add_argument(
5852
"--nipype-plugin",
@@ -65,7 +59,7 @@ def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, TR=None):
6559
opts.bold_roi.absolute(),
6660
opts.bold_atlas_roi.absolute(),
6761
opts.atlas_xfm.absolute(),
68-
TR=opts.tr,
62+
vol_sigma=opts.vol_sigma,
6963
)
7064

7165
wf.config['execution']['crashfile_format'] = 'txt'

0 commit comments

Comments
 (0)