-
Notifications
You must be signed in to change notification settings - Fork 241
using spike_vector on core/check_sortings_equal test
#4282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
using spike_vector on core/check_sortings_equal test
#4282
Conversation
for more information, see https://pre-commit.ci
|
@tayheau I think we actually needed the unit_index lex sort after all! The reason is that before we were testing spiketrain-by-spiketrain, so the order didn't matter if we had synchronous spikes. Now with the spike vector representation we need to ensure unit_index is sorted too! Sorry about that! :) |
for more information, see https://pre-commit.ci
…spike_vector_test_check_sorting_equal
…yheau/spikeinterface into spike_vector_test_check_sorting_equal
| spikes.append(spikes_in_seg) | ||
|
|
||
| spikes = np.concatenate(spikes) | ||
| spikes = spikes[np.lexsort((spikes["unit_index"], spikes["sample_index"], spikes["segment_index"]))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samuelgarcia I think it's better to lexsort the whole array at the end to make sure that units are also sorted within samples
|
|
||
| spikes = np.concatenate(spikes) | ||
| spikes = spikes[np.lexsort((spikes["sample_index"], spikes["segment_index"]))] | ||
| spikes = spikes[np.lexsort((spikes["unit_index"], spikes["sample_index"], spikes["segment_index"]))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we were missing the unit index lexsort in generate
| spikes = spikes[np.lexsort((spikes["unit_index"], spikes["sample_index"], spikes["segment_index"]))] | ||
| self._cached_spike_vector = spikes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and in zarr
Following this todo