We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c56bec6 commit d5fdba0Copy full SHA for d5fdba0
fmriprep/workflows/bold/base.py
@@ -247,6 +247,12 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False):
247
*sorted([(layout.get_metadata(bf)["EchoTime"], bf) for bf in bold_file])
248
)
249
ref_file = bold_file[0] # Reset reference to be the shortest TE
250
+ shapes = [nb.load(echo).shape for echo in bold_file]
251
+ if len(set(shapes)) != 1:
252
+ diagnostic = "\n".join(
253
+ f"{os.path.basename(echo)}: {shape}" for echo, shape in zip(bold_file, shapes)
254
+ )
255
+ raise RuntimeError(f"Multi-echo images found with mismatching shapes\n{diagnostic}")
256
257
if os.path.isfile(ref_file):
258
bold_tlen, mem_gb = _create_mem_gb(ref_file)
0 commit comments