From 7ba8492c17c88efa5134b101e0480baedafa47e1 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Fri, 18 Dec 2020 14:59:43 +0100 Subject: [PATCH] enh: improvements to boilerplate --- dmriprep/workflows/base.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dmriprep/workflows/base.py b/dmriprep/workflows/base.py index 83491c5a..fa29773a 100755 --- a/dmriprep/workflows/base.py +++ b/dmriprep/workflows/base.py @@ -253,6 +253,7 @@ def init_single_subject_wf(subject_id): spaces=spaces, t1w=subject_data["t1w"], ) + anat_preproc_wf.__desc__ = f"\n\n{anat_preproc_wf.__desc__}" # fmt:off workflow.connect([ @@ -290,9 +291,9 @@ def init_single_subject_wf(subject_id): # Append the dMRI section to the existing anatomical excerpt # That way we do not need to stream down the number of DWI datasets - anat_preproc_wf.__postdesc__ = ( - (anat_preproc_wf.__postdesc__ or "") - + f""" + anat_preproc_wf.__postdesc__ = f"""\ +{anat_preproc_wf.__postdesc__ or ''} + Diffusion data preprocessing : For each of the {len(subject_data["dwi"])} DWI scans found per subject @@ -300,7 +301,6 @@ def init_single_subject_wf(subject_id): format (i.e., given in RAS+ scanner coordinates, normalized b-vectors and scaled b-values), and a *b=0* average for reference to the subsequent steps of preprocessing was calculated. """ - ) # SDC Step 0: Determine whether fieldmaps can/should be estimated fmap_estimators = None @@ -360,6 +360,11 @@ def init_single_subject_wf(subject_id): output_dir=str(output_dir), subject=subject_id, ) + fmap_wf.__desc__ = f""" +*B0* fieldmap data preprocessing + +: A total of {len(fmap_estimators)} fieldmaps were found available within the input +BIDS structure for this particular subject. """ # TODO: Requires nipreps/sdcflows#147 for dwi_preproc_wf in dwi_preproc_list: