Skip to content

Commit 364551b

Browse files
committed
tinyRF: reproin - define a set of known BIDS datatypes to check against
1 parent 34242f3 commit 364551b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

heudiconv/heuristics/reproin.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@
213213
'criterion': 'Closest'
214214
}
215215

216+
217+
KNOWN_DATATYPES = {'anat', 'func', 'dwi', 'behav', 'fmap'}
218+
219+
216220
def _delete_chars(from_str, deletechars):
217221
""" Delete characters from string allowing for Python 2 / 3 difference
218222
"""
@@ -859,11 +863,11 @@ def split2(s):
859863

860864
# Let's analyze first element which should tell us sequence type
861865
seqtype, seqtype_label = split2(split[0])
862-
if seqtype not in {'anat', 'func', 'dwi', 'behav', 'fmap'}:
866+
if seqtype not in KNOWN_DATATYPES:
863867
# It is not something we don't consume
864868
if bids:
865-
lgr.warning("It was instructed to be BIDS sequence but unknown "
866-
"type %s found", seqtype)
869+
lgr.warning("It was instructed to be BIDS datatype but unknown "
870+
"%s found. Known are: %s", seqtype, ', '.join(KNOWN_DATATYPES))
867871
return {}
868872

869873
regd = dict(seqtype=seqtype)

0 commit comments

Comments
 (0)