Skip to content

Commit

Permalink
fix issue #854
Browse files Browse the repository at this point in the history
  • Loading branch information
j-friedrich committed Mar 22, 2021
1 parent 3975a6f commit e2b191d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions caiman/source_extraction/cnmf/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2b191d

Please sign in to comment.