Skip to content

Commit

Permalink
mat file revamp: Use consistent phrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
pgunn committed Apr 26, 2024
1 parent fafffce commit 2581815
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions caiman/base/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ def load(file_name: Union[str, list[str]],
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
raise Exception(f"Problem loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed. Sync with get_file_size() !!
fkeys = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(fkeys) == 1: # If the file we're parsing has only one dataset inside it,
Expand Down Expand Up @@ -1951,7 +1951,7 @@ def load_iter(file_name: Union[str, list[str]], subindices=None, var_name_hdf5:
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
raise Exception(f"Problem loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed.
fkeys = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(fkeys) == 1: # If the hdf5 file we're parsing has only one dataset inside it,
Expand Down Expand Up @@ -2045,7 +2045,7 @@ def get_file_size(file_name, var_name_hdf5:str='mov') -> tuple[tuple, Union[int,
if extension == '.mat':
raise Exception(f"Problem loading {file_name}: Unknown format. This may be in the original version 1 (non-hdf5) mat format; please convert it first")
else:
raise Exception(f"Problem in loading {file_name}: Unknown format.")
raise Exception(f"Problem loading {file_name}: Unknown format.")
ignore_keys = ['__DATA_TYPES__'] # Known metadata that tools provide, add to this as needed. Sync with movies.my:load() !!
kk = list(filter(lambda x: x not in ignore_keys, f.keys()))
if len(kk) == 1: # TODO: Consider recursing into a group to find a dataset
Expand Down

0 comments on commit 2581815

Please sign in to comment.