Skip to content

Commit bacc323

Browse files
committed
Update fit.py
1 parent 1e945d2 commit bacc323

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fmriprep/workflows/pet/fit.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ def init_pet_fit_wf(
253253
petref_wf = init_raw_petref_wf(
254254
name='petref_wf',
255255
pet_file=pet_file,
256+
reference_frame=config.workflow.reference_frame,
256257
)
257-
petref_wf.inputs.inputnode.dummy_scans = config.workflow.dummy_scans
258258

259259
ds_petref_wf = init_ds_petref_wf(
260260
bids_root=layout.root,
@@ -451,7 +451,13 @@ def init_pet_native_wf(
451451
)
452452

453453
# PET source: track original PET file(s)
454-
pet_source = pe.Node(niu.Select(inlist=[pet_file]), name='pet_source')
454+
# The Select interface requires an index to choose from ``inlist``. Since
455+
# ``pet_file`` is a single path, explicitly set the index to ``0`` to avoid
456+
# missing mandatory input errors when the node runs.
457+
pet_source = pe.Node(
458+
niu.Select(inlist=[pet_file], index=0),
459+
name='pet_source'
460+
)
455461
validate_pet = pe.Node(ValidateImage(), name='validate_pet')
456462
workflow.connect([
457463
(pet_source, validate_pet, [('out', 'in_file')]),

0 commit comments

Comments
 (0)