Skip to content

Commit

Permalink
correct problem changing loaded params
Browse files Browse the repository at this point in the history
  • Loading branch information
EricThomson committed Mar 22, 2024
1 parent 54915d3 commit 8eb8d05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions caiman/source_extraction/cnmf/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,9 @@ def check_consistency(self):
if self.data['dims'] is None and self.data['fnames'] is not None:
self.data['dims'] = caiman.base.movies.get_file_size(self.data['fnames'], var_name_hdf5=self.data['var_name_hdf5'])[0]
if self.data['fnames'] is not None:
if isinstance(self.data['fnames'], str):
self.data['fnames'] = [self.data['fnames']]
# following handles reloaded data where strings are byte-encoded
if not isinstance(self.data['fnames'][0], str):
self.data['fnames'] = [fname.decode('utf-8') for fname in self.data['fnames']]
T = caiman.base.movies.get_file_size(self.data['fnames'], var_name_hdf5=self.data['var_name_hdf5'])[1]
if len(self.data['fnames']) > 1:
T = T[0]
Expand Down

0 comments on commit 8eb8d05

Please sign in to comment.