Skip to content

Commit 878d4fe

Browse files
committed
Fix for saving fmaps in derivatives
1 parent 0b5c504 commit 878d4fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bidscoin/bids.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,14 @@ def get_derivatives(datatype: str) -> list:
13071307
else:
13081308
typegroups = _DATATYPE_CACHE[datatype]
13091309
return typegroups[1]['suffixes'] # The qMRI data (maps)
1310+
elif datatype == 'fmap':
1311+
if datatype not in _DATATYPE_CACHE:
1312+
with (schema_folder/'datatypes'/'fmap.yaml').open('r') as stream:
1313+
typegroups = yaml.load(stream)
1314+
_DATATYPE_CACHE[datatype] = typegroups
1315+
else:
1316+
typegroups = _DATATYPE_CACHE[datatype]
1317+
return [suffix for n,typegroup in enumerate(typegroups) for suffix in typegroup['suffixes'] if n>1] # The non-standard fmaps (file collections)
13101318
else:
13111319
return []
13121320

0 commit comments

Comments
 (0)