Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added warning for mid-cycle split for multifile scanimage #361

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

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

### Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def __init__(
file_paths = natsorted(self.folder_path.glob(file_pattern))
if len(file_paths) == 0:
raise ValueError(f"No files found in folder with pattern: {file_pattern}")
if any(file_path.name.endswith("00001_00001.tif") for file_path in file_paths):
warn(
"ScanImageTiffMultiPlaneMultiFileImagingExtractor does not support mid-cycle splits from ScanImage"
" with the characteristic file name pattern 'prefix_00001_00001.tif'. Please raise an issue to request"
" this feature: https://github.com/catalystneuro/roiextractors/issues"
)
if not extract_all_metadata:
metadata = extract_extra_metadata(file_paths[0])
parsed_metadata = parse_metadata(metadata)
Expand Down Expand Up @@ -107,6 +113,12 @@ def __init__(
file_paths = natsorted(self.folder_path.glob(file_pattern))
if len(file_paths) == 0:
raise ValueError(f"No files found in folder with pattern: {file_pattern}")
if any(file_path.name.endswith("00001_00001.tif") for file_path in file_paths):
warn(
"ScanImageTiffSinglePlaneMultiFileImagingExtractor does not support mid-cycle splits from ScanImage"
" with the characteristic file name pattern 'prefix_00001_00001.tif'. Please raise an issue to request"
" this feature: https://github.com/catalystneuro/roiextractors/issues"
)
if not extract_all_metadata:
metadata = extract_extra_metadata(file_paths[0])
parsed_metadata = parse_metadata(metadata)
Expand Down
Loading