Skip to content

Commit b757367

Browse files
mgxdeffigies
authored andcommitted
FIX: Determine resolution by sloppy parameter
1 parent 7188439 commit b757367

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

smriprep/workflows/outputs.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ def init_template_iterator_wf(
11681168
run_without_submitting=True,
11691169
)
11701170
select_tpl = pe.Node(
1171-
TemplateFlowSelect(resolution=2 if sloppy else 1), name='select_tpl', run_without_submitting=True
1171+
TemplateFlowSelect(), name='select_tpl', run_without_submitting=True
11721172
)
11731173

11741174
# fmt:off
@@ -1185,7 +1185,7 @@ def init_template_iterator_wf(
11851185
(spacesource, select_tpl, [
11861186
('space', 'template'),
11871187
('cohort', 'cohort'),
1188-
(('resolution', _no_native), 'resolution'),
1188+
(('resolution', _no_native, sloppy), 'resolution'),
11891189
]),
11901190
(spacesource, outputnode, [
11911191
('space', 'space'),
@@ -1251,10 +1251,6 @@ def _pick_cohort(in_template):
12511251
return [_pick_cohort(v) for v in in_template]
12521252

12531253

1254-
def _fmt(in_template):
1255-
return in_template.replace(':', '_')
1256-
1257-
12581254
def _empty_report(in_file=None):
12591255
from pathlib import Path
12601256

@@ -1276,11 +1272,11 @@ def _is_native(value):
12761272
return value == 'native'
12771273

12781274

1279-
def _no_native(value):
1275+
def _no_native(value, sloppy=False):
12801276
try:
12811277
return int(value)
12821278
except (TypeError, ValueError):
1283-
return 1
1279+
return 2 if sloppy else 1
12841280

12851281

12861282
def _drop_path(in_path):

0 commit comments

Comments
 (0)