Skip to content

Commit eddb35c

Browse files
authored
Merge pull request #542 from cbinyu/fix_echo_order_in_filename
BF: Fix the order of the 'echo' entity in the filename
2 parents 80a6538 + 405d0ac commit eddb35c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

heudiconv/convert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ def update_multiecho_name(metadata, filename, echo_times):
338338
filetype = '_' + filename.split('_')[-1]
339339

340340
# Insert it **before** the following string(s), whichever appears first.
341-
for label in ['_recording', '_proc', '_space', filetype]:
341+
# https://bids-specification.readthedocs.io/en/stable/99-appendices/04-entity-table.html
342+
for label in ['_flip', '_inv', '_mt', '_part', '_recording', '_proc', '_space', filetype]:
342343
if (label == filetype) or (label in filename):
343344
filename = filename.replace(
344345
label, "_echo-%s%s" % (echo_number, label)

0 commit comments

Comments
 (0)