Add option to export spike waveforms subset to phy (mimic phy extract-waveforms)#4699
Open
alejoe91 wants to merge 2 commits into
Open
Add option to export spike waveforms subset to phy (mimic phy extract-waveforms)#4699alejoe91 wants to merge 2 commits into
alejoe91 wants to merge 2 commits into
Conversation
Writes _phy_spikes_subset.{spikes,channels,waveforms}.npy from the
SortingAnalyzer's "waveforms"/"random_spikes" extensions, so phy/phy-lib
can display individual spike waveforms without re-reading the raw
recording.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
add_waveformsoption toexport_to_phythat writes phy's_phy_spikes_subset.{spikes,channels,waveforms}.npyfiles, mimicking thephy extract-waveformsCLI command.SortingAnalyzer'swaveforms/random_spikesextensions when already computed, and computes them on demand otherwise (skipping with a warning if there's no recording available).SortingAnalyzer/sparsity combinations, matching the sparsity already used fortemplates.npy/pc_feature_ind.npy.Test plan
phylib.io.model.TemplateModel(phy's own loader) that the exported files load correctly and return proper per-cluster waveforms, for both sparse and dense analyzers.nbefore/uV scaling).src/spikeinterface/exporters/tests/coveringadd_waveforms=True.🤖 Generated with Claude Code