Add ZarrArrayExtractor to read "plain" Zarr arrays - #4760
Draft
chrishalcrow wants to merge 6 commits into
Draft
Conversation
ZarrArrayExtractor to read "plain" Zarr filesZarrArrayExtractor to read "plain" Zarr arrays
alejoe91
reviewed
Sep 4, 2026
alejoe91
reviewed
Sep 4, 2026
chrishalcrow
commented
Sep 4, 2026
| sampling_frequency: float, | ||
| gain_to_uV: float | np.ndarray | None = None, | ||
| offset_to_uV: float | np.ndarray | None = None, | ||
| is_filtered: bool | None = None, |
Member
Author
There was a problem hiding this comment.
Should this really be None?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a
read_zarr_arrayfunction which reads a Zarr array as a recording object (in the same way thatread_binaryreads a binary array).Currently, we support reading Zarr files which have been generated by SpikeInterface. A big use case for Zarr is that it gives easy access to nice compression algorithms, and users may want to compress their raw data and delete it. But at the moment we only allow access to these through SpikeInterface. This makes SpikeInterface a dependency for reading your raw data: not ideal!
Instead, a user might use zarr directly to compress their binary arrays. This PR adds the functionality to read these externally-generated zarr-arrays. With a couple of tweaks, we can use all the existing zarr functionality, woo!
I've made this as lightweight as possible - even stripping out some kwargs that
read_binaryuses. I might have pruned too much.Tests incoming...