Skip to content

Commit 0eb5fbd

Browse files
pvelascoyarikoptic
authored andcommitted
Make sure we don't add _rec-magnitude for sbref when there are no phase images
1 parent 5b72404 commit 0eb5fbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

heudiconv/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def save_converted_files(res, item_dicoms, bids_options, outtype, prefix, outnam
550550
# _sbref sequences reconstructing magnitude and phase generate
551551
# two NIfTI files IN THE SAME SERIES, so we cannot just add
552552
# the suffix, if we want to be bids compliant:
553-
if bids_file and this_prefix_basename.endswith('_sbref'):
553+
if bids_file and this_prefix_basename.endswith('_sbref') and len(suffixes)>len(echo_times):
554554
# Check to see if it is magnitude or phase reconstruction:
555555
if 'M' in fileinfo.get('ImageType'):
556556
mag_or_phase = 'magnitude'

0 commit comments

Comments
 (0)