SpikeInterface / spikeinterface

A Python-based module for creating flexible and robust spike sorting pipelines.
https://spikeinterface.readthedocs.io
MIT License
533 stars 187 forks source link

compare_multiple_templates error #2599

Closed AOONIH closed 8 months ago

AOONIH commented 8 months ago

Hi,

I'm trying to compare sorter outputs over days and tried using the compare_multiple_templates function.
I get this error: ValueError: Shape of passed values is (191, 191), indices imply (191, 132) which comes from: self.agreement_scores = pd.DataFrame(agreement_scores, index=self.unit_ids[0], columns=self.unit_ids[1]) I'm not sure why agreement_scores is a square matrix if the number of units is different across the 2 sorters?

AOONIH commented 8 months ago

I think I found the issue: Line 115 in template_similarity.py specifies the function postion arguments incorrectly: _compute_template_similarity(waveform_extractor, waveform_extractor_other, method)

chrishalcrow commented 8 months ago

Hello @AOONIH, thanks, you've found the issue. I'll write a test which isolates this issue and write a pull request to fix it soon. If you're interested in helping to develop spikeinterface and want to help write the pull request, let me know :)

Edit: I did it quickly this time, but please let me know if you want to help to contribute when you find the next bug :)

zm711 commented 8 months ago

Fixed by #2601.