We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1c1bda commit 42a0228Copy full SHA for 42a0228
viscy/data/hcs.py
@@ -141,6 +141,12 @@ def _get_windows(self) -> None:
141
img_arr: ImageArray = fov["0"]
142
ts = img_arr.frames
143
zs = img_arr.slices - self.z_window_size + 1
144
+ if zs < 1:
145
+ raise IndexError(
146
+ f"Z window size {self.z_window_size} "
147
+ f"is larger than the number of Z slices ({img_arr.slices}) "
148
+ f"for FOV {fov.name}."
149
+ )
150
w += ts * zs
151
self.window_keys.append(w)
152
self.window_arrays.append(img_arr)
0 commit comments