-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements Zarr v3 with the [sharding storage transformer](https://web.archive.org/web/20230213221154/https://zarr-specs.readthedocs.io/en/latest/extensions/storage-transformers/sharding/v1.0.html). (Not the [sharding codec](https://zarr-specs.readthedocs.io/en/latest/v3/codecs/sharding-indexed/v1.0.html), which is WIP, but I'm keeping an eye on it.) Supersedes #101. Supersedes #125. Closes #76. Closes #111. ## Changes ### Added - Support for [Zarr v3](https://zarr-specs.readthedocs.io/en/latest/v3/core/v3.0.html). - Support for the [sharding storage transformer](https://web.archive.org/web/20230213221154/https://zarr-specs.readthedocs.io/en/latest/extensions/storage-transformers/sharding/v1.0.html) in Zarr v3. ## Testing Since napari doesn't yet support Zarr v3, we can use zarr-python with matplotlib to do a sanity check. Write out a Zarr v3 dataset using either `write-zarr-v3-raw` or `write-zarr-v3-compressed` in the `tests` folder, then run the following Python script: ```python import os import numpy as np import matplotlib.pyplot as plt # these MUST come before importing zarr os.environ["ZARR_V3_EXPERIMENTAL_API"] = "1" os.environ["ZARR_V3_SHARDING"] = "1" import zarr def plot_array(input_zarr): store3 = zarr.DirectoryStoreV3(input_zarr) z3 = zarr.open(store=store3, mode="r") for (k3, a3) in z3.arrays(): for i in range(a3.shape[0]): plt.imshow(a3[i, 0, :, :]) plt.show() if __name__ == "__main__": plot_array("C:/testing/acquire-driver-zarr-write-zarr-v3-compressed.zarr") # change this to point to the dataset you wrote out ``` For best results, you'll want to change the simulated camera used to something more intelligible, e.g., radial sin.
- Loading branch information
Showing
38 changed files
with
2,128 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule acquire-core-libs
updated
7 files
Oops, something went wrong.