Skip to content

Add GatherToZarr and save pipeline node extension data to disk - #4703

Open
alejoe91 wants to merge 30 commits into
SpikeInterface:mainfrom
alejoe91:gather-to-zarr
Open

Add GatherToZarr and save pipeline node extension data to disk#4703
alejoe91 wants to merge 30 commits into
SpikeInterface:mainfrom
alejoe91:gather-to-zarr

Conversation

@alejoe91

@alejoe91 alejoe91 commented Jul 21, 2026

Copy link
Copy Markdown
Member

This PR continues in the direction of support for very long chronic data. This feature prevents loading all spike vector based extension data to memory prior to saving!

  • It adds a GatherToZarr class to save node pipeline data as it's being computed to zarr datasets.
  • it modifies the GatherToNpy to be able to specify multiple folders for different files

These two changes allow to extend the SortingAnalyzer compute functionality to directly save extension data from node pipelines computations (usually spike-vector based extensions) directly to their final location (numpy files or zarr datasets).
This is only enabled when the SortingAnalyzer has a folder backend (binary folder or zarr).

@alejoe91
alejoe91 requested a review from chrishalcrow July 21, 2026 13:29
@alejoe91 alejoe91 added the core Changes to core module label Jul 21, 2026
@alejoe91
alejoe91 marked this pull request as ready for review July 23, 2026 12:31
Comment thread src/spikeinterface/core/node_pipeline.py Outdated

def finalize_buffers(self, squeeze_output=False):
import zarr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we ensure that the last buffer is written if the last chunk is not complete ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean? the pipipeline takes care of all chunks

return self.arrays[0]


def _split_zarr_store_path(dataset_path):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that th zarr suffix is a good aproach for this.
Looking for "extensions" would be safer for the analyzer no ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you mean here

Comment thread src/spikeinterface/core/sortinganalyzer.py Outdated
@samuelgarcia

Copy link
Copy Markdown
Member

OK for me.
I did some small comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants