Skip to content

Commit

Permalink
Merge pull request #268 from catalystneuro/small_improvement_to_bruker
Browse files Browse the repository at this point in the history
Two small improvements to `BrukerTiffMultiPlaneImagingExtractor`
  • Loading branch information
h-mayorquin authored Dec 19, 2023
2 parents 70b629d + b17b2b1 commit 88004d1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,20 @@ def __init__(
tif_file_paths = list(folder_path.glob("*.ome.tif"))
assert tif_file_paths, f"The TIF image files are missing from '{folder_path}'."

assert _determine_imaging_is_volumetric(folder_path=folder_path), (
streams = self.get_streams(folder_path=folder_path)
plane_streams = streams["plane_streams"]

assert len(plane_streams) > 0, (
f"{self.extractor_name}Extractor is for volumetric imaging. "
"For single imaging plane data use BrukerTiffSinglePlaneImagingExtractor."
)

streams = self.get_streams(folder_path=folder_path)
if stream_name is None:
if len(streams["channel_streams"]) > 1:
raise ValueError(
"More than one recording stream is detected! Please specify which stream you wish to load with the `stream_name` argument. "
"To see what streams are available, call `BrukerTiffMultiPlaneImagingExtractor.get_stream_names(folder_path=...)`."
"The following channel streams are available: \n"
f"{streams['channel_streams']}"
)
channel_stream_name = streams["channel_streams"][0]
stream_name = streams["plane_streams"][channel_stream_name][0]
Expand Down

0 comments on commit 88004d1

Please sign in to comment.