Skip to content

Commit

Permalink
enh: improvements to boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Dec 18, 2020
1 parent 541521c commit 7ba8492
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dmriprep/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -290,17 +291,16 @@ 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
(across all sessions), the gradient table was vetted and converted into the *RASb*
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
Expand Down Expand Up @@ -360,6 +360,11 @@ def init_single_subject_wf(subject_id):
output_dir=str(output_dir),
subject=subject_id,
)
fmap_wf.__desc__ = f"""
*B<sub>0</sub>* 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:
Expand Down

0 comments on commit 7ba8492

Please sign in to comment.