Skip to content

Commit

Permalink
more merging
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Jan 28, 2025
1 parent c409c80 commit a6fae17
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pynwb/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ def _check_time_series_dimension(self):
"""Override _check_time_series_dimension to do nothing.
The _check_image_series_dimension method will be called instead.
"""
return
return True

def _check_image_series_dimension(self):
"""Check that the 0th dimension of data equals the length of timestamps, when applicable.
ImageSeries objects can have an external file instead of data stored. The external file cannot be
queried for the number of frames it contains, so this check will return when an external file
queried for the number of frames it contains, so this check will return True when an external file
is provided. Otherwise, this function calls the parent class' _check_time_series_dimension method.
"""
if self.external_file is not None:
Expand All @@ -164,9 +164,9 @@ def _check_external_file_format(self):
Check that format is 'external' when external_file is specified.
"""
if self.external_file is None:
return True
return
if self.format == "external":
return True
return

return "%s '%s': Format must be 'external' when external_file is specified." % (
self.__class__.__name__,
Expand All @@ -178,9 +178,9 @@ def _check_external_file_data(self):
Check that data is an empty array when external_file is specified.
"""
if self.external_file is None:
return True
return
if get_data_shape(self.data)[0] == 0:
return True
return

return (
"%s '%s': Either external_file or data must be specified (not None), but not both."
Expand Down

0 comments on commit a6fae17

Please sign in to comment.