Skip to content

Commit 938ca29

Browse files
committed
fix M+MAGNITUDE case
1 parent 3541157 commit 938ca29

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
@@ -1055,7 +1055,8 @@ def save_converted_files(
10551055
len(set(filter(bool, channel_names))) > 1
10561056
) # Check for uncombined data
10571057
# Determine if data are complex (magnitude + phase or real + imag or all-4)
1058-
is_complex = len(set(IMAGETYPE_TO_PARTS.keys()).intersection(image_types))
1058+
parts = filter(bool, [IMAGETYPE_TO_PARTS.get(it) for it in image_types])
1059+
is_complex = len(set(parts)) > 1
10591060
echo_times_lst = sorted(echo_times) # also converts to list
10601061
channel_names_lst = sorted(channel_names) # also converts to list
10611062

0 commit comments

Comments
 (0)