Skip to content

Commit

Permalink
NDCube fail
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarDrew committed Feb 7, 2025
1 parent 090a155 commit 408b9f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dkist/dataset/tiled_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def plot(self, slice_index, share_zscale=False, figure=None, swap_tile_limits: L
figure = plt.gcf()

sliced_dataset = self.slice_tiles[slice_index]
if (nd_sliced := len(sliced_dataset.flat[0].shape)) != 2:
# This can change to just .shape once we support ndcube >= 2.3
if (nd_sliced := len(sliced_dataset.flat[0].data.shape)) != 2:
raise ValueError(

Check warning on line 232 in dkist/dataset/tiled_dataset.py

View check run for this annotation

Codecov / codecov/patch

dkist/dataset/tiled_dataset.py#L231-L232

Added lines #L231 - L232 were not covered by tests
f"Applying slice '{slice_index}' to this dataset resulted in a {nd_sliced} "
"dimensional dataset, you should pass a slice which results in a 2D dataset for each tile."
Expand Down

0 comments on commit 408b9f6

Please sign in to comment.