Skip to content

Commit

Permalink
Add test coverage that non-square TiledDatasets are plotted correctly
Browse files Browse the repository at this point in the history
And update image hashes
  • Loading branch information
eigenbrot committed Jan 23, 2025
1 parent 304ff9a commit 7861d36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion dkist/dataset/tests/test_tiled_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ def test_tileddataset_plot(share_zscale):
for tile in newtiles:
tile.meta["inventory"] = ori_ds.inventory
ds = TiledDataset(np.array(newtiles).reshape(ori_ds.shape), inventory=newtiles[0].inventory)
non_square_ds = ds[:2, :]
assert non_square_ds.shape[0] != non_square_ds.shape[1] # Just in case the underlying data change for some reason
fig = plt.figure(figsize=(12, 15))
ds.plot(0, share_zscale=share_zscale, fig=fig)
non_square_ds.plot(0, share_zscale=share_zscale, fig=fig)
assert fig.axes[0].get_gridspec().get_geometry() == non_square_ds.shape[::-1]
return plt.gcf()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"dkist.dataset.tests.test_plotting.test_2d_plot[aslice1]": "cbb84fbae51d8238803f8f0d6820c575f024fe54b1656f1b181dc4ec645e9ff9",
"dkist.dataset.tests.test_plotting.test_2d_plot[aslice2]": "132c5615832daff457dacb4cb770498f1fbb4460a5b90b5d4d01d224c70eeb28",
"dkist.dataset.tests.test_plotting.test_2d_plot2": "409b5a10ad8ccf005331261505e63ce8febdc38eb8b5a34f8863e567e3cccb9c",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[share_zscale]": "859641d0884ef13a6575ca7125cecea0faaf3722702c22b9a59a728d6c7abe0e",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[indpendent_zscale]": "042305abd97f9a59522c5b5e5d7f5389fe010c604b08b9afe00ec7e5a49b7b65"
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[share_zscale]": "839887727c4e47d956331865cb6773f8ba92e4c20f342018fd60090ae50326a5",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[indpendent_zscale]": "309e0693d666368bcc3d1c98ebb2541a09dfcf28a2451758d79f870ac6aee3cc"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"dkist.dataset.tests.test_plotting.test_2d_plot[aslice1]": "cbb84fbae51d8238803f8f0d6820c575f024fe54b1656f1b181dc4ec645e9ff9",
"dkist.dataset.tests.test_plotting.test_2d_plot[aslice2]": "4b5be9cf1883d0ebd15ff091f52cea2822068e8238a8df7b0f594d69fba27597",
"dkist.dataset.tests.test_plotting.test_2d_plot2": "1c10e9db44b0b694a6bb1b493c4c2193278541df7c1302bb11fe3f6372682e35",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[share_zscale]": "a5c5e439af14d99110858b552649a334ca2157f146c702cb5ce790fe6ba8ca1a",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[indpendent_zscale]": "71022ae3a7bbc2e1250cb5913479d72ad73570eb2e10dd463faf83a1e47865e7"
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[share_zscale]": "3ff43a5f92e253c9033dbfd7b101c09739d941fb604220ce88dfe2278261df06",
"dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[indpendent_zscale]": "c0a1e248e133c6ea86f80ec5cc30d2ded9e740efec02a4f09847310b72ff9b18"
}

0 comments on commit 7861d36

Please sign in to comment.