Skip to content

Commit 6f27c1f

Browse files
committed
enh: improvements to boilerplate
1 parent 541521c commit 6f27c1f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dmriprep/workflows/base.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ def init_single_subject_wf(subject_id):
253253
spaces=spaces,
254254
t1w=subject_data["t1w"],
255255
)
256+
anat_preproc_wf.__desc__ = f"\n\n{anat_preproc_wf.__desc__}"
256257

257258
# fmt:off
258259
workflow.connect([
@@ -290,17 +291,16 @@ def init_single_subject_wf(subject_id):
290291

291292
# Append the dMRI section to the existing anatomical excerpt
292293
# That way we do not need to stream down the number of DWI datasets
293-
anat_preproc_wf.__postdesc__ = (
294-
(anat_preproc_wf.__postdesc__ or "")
295-
+ f"""
294+
anat_preproc_wf.__postdesc__ = f"""\
295+
{anat_preproc_wf.__postdesc__ or ''}
296+
296297
Diffusion data preprocessing
297298
298299
: For each of the {len(subject_data["dwi"])} DWI scans found per subject
299300
(across all sessions), the gradient table was vetted and converted into the *RASb*
300301
format (i.e., given in RAS+ scanner coordinates, normalized b-vectors and scaled b-values),
301302
and a *b=0* average for reference to the subsequent steps of preprocessing was calculated.
302303
"""
303-
)
304304

305305
# SDC Step 0: Determine whether fieldmaps can/should be estimated
306306
fmap_estimators = None
@@ -360,6 +360,12 @@ def init_single_subject_wf(subject_id):
360360
output_dir=str(output_dir),
361361
subject=subject_id,
362362
)
363+
fmap_wf.__desc__ = f"""
364+
*B<sub>0</sub>* fieldmap data preprocessing
365+
366+
: A total of {len(fmap_estimators)} fieldmaps were found available within the input
367+
BIDS structure for this particular subject.
368+
"""
363369

364370
# TODO: Requires nipreps/sdcflows#147
365371
for dwi_preproc_wf in dwi_preproc_list:

0 commit comments

Comments
 (0)