Skip to content

Commit 7c33deb

Browse files
committed
fix tests, bugs
1 parent 00a20eb commit 7c33deb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

smriprep/workflows/anatomical.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ def init_anat_template_wf(
14841484
if gradunwarp_file:
14851485
nds = [
14861486
(
1487-
meta.get('NonlinearGradientCorrection', None)
1487+
not meta.get('NonlinearGradientCorrection', None)
14881488
or 'ND' in meta.get('ImageType', [])
14891489
or False
14901490
)
@@ -1498,7 +1498,7 @@ def init_anat_template_wf(
14981498
gradunwarp_file = None
14991499
if gradunwarp_file:
15001500
gradunwarp_ver = GradUnwarp.version()
1501-
workflow.__desc__ += f"""\
1501+
workflow.__desc__ = (workflow.__desc__ or "") + f"""\
15021502
{"Each" if num_files > 1 else "The"} {contrast} image was corrected for gradient
15031503
non-linearity with `gradunwarp` [@gradunwarp] {gradunwarp_ver} [@gradunwarp]\n"""
15041504
gradunwarp_wf = init_gradunwarp_wf('gradunward_T1w')

smriprep/workflows/tests/test_anatomical.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
BASE_LAYOUT = {
2121
'01': {
2222
'anat': [
23-
{'run': 1, 'suffix': 'T1w'},
23+
{
24+
'run': 1,
25+
'suffix': 'T1w',
26+
'metadata': {'ImageType': ['ND']},
27+
},
2428
{'run': 2, 'suffix': 'T1w'},
2529
{'suffix': 'T2w'},
2630
],

0 commit comments

Comments
 (0)