spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Fix nn pca_metric computation and update tests

Open chrishalcrow opened this issue 7 months ago • 0 comments

Fixes a bug where nn_isolation and nn_noise_overlap were not being calculated.

In the compute_pc_metrics function, which calls the pca_metrics_one_unit function, the pca computations were surrounded by try/except statements. These meant that the computations were failing but the tests were passing.

The nn_isolation and nn_noise_overlap computations don’t fit into the quality metrics parallelisation easily, because they require waveforms. Hence they had to be moved so that they are calculated separately, and without parallelisation. It would be good idea to speed them up soon!

The tests involving the nn metrics were taking a long time (5mins+ on my machine) so I swapped in the small_sorting_analyzer, which sped things up. I also played a little with the small_sorting_analyzer to make sure all quality_metrics had non-NaN or non-trivial results for both the pca and non-pca quality metrics.

chrishalcrow avatar Jul 04 '24 08:07 chrishalcrow