Skip to content

Commit a103259

Browse files
tsaloeffigies
andauthored
Update src/smriprep/utils/bids.py
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 90f2c94 commit a103259

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/smriprep/utils/bids.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ def collect_derivatives(
7070

7171
paths = [item.path for item in item]
7272

73-
if key.startswith('t2w_'):
74-
derivs_cache[key] = paths[0] if len(paths) == 1 else paths
75-
else:
76-
derivs_cache[f't1w_{key}'] = paths[0] if len(paths) == 1 else paths
73+
if not key.startswith('t2w_'):
74+
key = f't1w_{key}'
75+
derivs_cache[key] = paths[0] if len(paths) == 1 else paths
7776

7877
transforms = derivs_cache.setdefault('transforms', {})
7978
for _space in std_spaces:

0 commit comments

Comments
 (0)