Skip to content

Commit

Permalink
Added specific error message for single-frame scanimage data (#360)
Browse files Browse the repository at this point in the history
* added specific notimplementederror for single-frame case

* updated changelog
  • Loading branch information
pauladkisson authored Sep 17, 2024
1 parent dbd9c83 commit 735a866
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Upcoming (v0.5.9)
# Upcoming (v0.5.10)

### Features

### Fixes
* Added specific error message for single-frame scanimage data [PR #360](https://github.com/catalystneuro/roiextractors/pull/360)

### Improvements

### Testing

# v0.5.9

### Deprecations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@ def __init__(
ScanImageTiffReader = _get_scanimage_reader()
with ScanImageTiffReader(str(self.file_path)) as io:
shape = io.shape() # [frames, rows, columns]
if len(shape) == 3:
if len(shape) == 2: # [rows, columns]
raise NotImplementedError(
"Extractor cannot handle single-frame ScanImageTiff data. Please raise an issue to request this feature: "
"https://github.com/catalystneuro/roiextractors/issues "
)
elif len(shape) == 3:
self._total_num_frames, self._num_rows, self._num_columns = shape
if (
self._num_planes == 1
Expand Down

0 comments on commit 735a866

Please sign in to comment.