From e2b191dfee43383f061228f86b46c0c38f196fbf Mon Sep 17 00:00:00 2001 From: Johannes Friedrich Date: Mon, 22 Mar 2021 15:35:48 -0400 Subject: [PATCH] fix issue #854 --- caiman/source_extraction/cnmf/utilities.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/caiman/source_extraction/cnmf/utilities.py b/caiman/source_extraction/cnmf/utilities.py index 26addf0d5..a2b766dc7 100644 --- a/caiman/source_extraction/cnmf/utilities.py +++ b/caiman/source_extraction/cnmf/utilities.py @@ -968,10 +968,10 @@ def get_file_size(file_name, var_name_hdf5='mov'): if loading from hdf5 name of the dataset to load Returns: - dims: list + dims: tuple dimensions of FOV - T: list + T: int or tuple of int number of timesteps in each file """ if isinstance(file_name, pathlib.Path): @@ -1059,6 +1059,10 @@ def get_file_size(file_name, var_name_hdf5='mov'): else: dims, T = zip(*[get_file_size(fn, var_name_hdf5=var_name_hdf5) for fn in file_name]) + if len(set(dims)) > 1: + raise Exception('Files have FOVs with different sizes') + else: + dims = dims[0] else: raise Exception('Unknown input type') return dims, T