Skip to content

Commit 9741ee8

Browse files
committed
fix M+MAGNITUDE case
1 parent 5894be7 commit 9741ee8

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
@@ -1002,7 +1002,8 @@ def save_converted_files(
10021002
len(set(filter(bool, channel_names))) > 1
10031003
) # Check for uncombined data
10041004
# Determine if data are complex (magnitude + phase or real + imag or all-4)
1005-
is_complex = len(set(IMAGETYPE_TO_PARTS.keys()).intersection(image_types))
1005+
parts = filter(bool, [IMAGETYPE_TO_PARTS.get(it) for it in image_types])
1006+
is_complex = len(set(parts)) > 1
10061007
echo_times_lst = sorted(echo_times) # also converts to list
10071008
channel_names_lst = sorted(channel_names) # also converts to list
10081009

0 commit comments

Comments
 (0)