Skip to content

Copy the recording from original sorting during NumpySorting.from_sorting()#4417

Open
ecobost wants to merge 2 commits intoSpikeInterface:mainfrom
ecobost:sorting_w_recroding_in_analyzer
Open

Copy the recording from original sorting during NumpySorting.from_sorting()#4417
ecobost wants to merge 2 commits intoSpikeInterface:mainfrom
ecobost:sorting_w_recroding_in_analyzer

Conversation

@ecobost
Copy link
Contributor

@ecobost ecobost commented Feb 28, 2026

When calling out_sorting = NumpySorting.from_sorting(sorting), out_sorting will also inherit the recording of the source.

This partly solves #4410 for the case when the analyzer is created in memory.

import spikeinterface.core.sortinganalyzer as sa

print(sorting.has_recording()) # True
analyzer = sa.create_sorting_analyzer(sorting, recording=sorting._recording)
print(analyzer.sorting.has_recording()) # True :)

print(sorting.has_recording()) # True
analyzer = sa.create_sorting_analyzer(sorting, recording=sorting._recording, format='binary_folder', folder='test_analyzer')
print(analyzer.sorting.has_recording()) # False :(

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant