cortex-lab / phylib

Lightweight electrophysiological data analysis library
BSD 3-Clause "New" or "Revised" License
11 stars 23 forks source link

Fix cluster indexing bug in merge probe #13

Closed oliche closed 5 years ago

oliche commented 5 years ago

This is essentially 2 bug fixes and associated tests: 1) The cluster_probes object didn't have the appropriate dimension. The reason was the indexing was only addressing clusters present in the current set of cluster_spikes, not all the orginal clusters 2) another issue was the direct casting to uint64 when converting spike times to spike samples which in effects performs a round down instead of a closest round. This is a potentially deeper issue if we consider spikes do not necessarily need to be assigned to an integer sample for various reasons (non-integer shift, clock-drift, parametric picking of spike time etc...)

codecov-io commented 5 years ago

Codecov Report

Merging #13 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #13   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          42     42           
  Lines        3750   3833   +83     
=====================================
+ Hits         3750   3833   +83
Impacted Files Coverage Δ
phylib/io/model.py 100% <100%> (ø) :arrow_up:
phylib/io/merge.py 100% <100%> (ø) :arrow_up:
phylib/io/tests/test_merge.py 100% <100%> (ø) :arrow_up:
phylib/io/tests/test_alf.py 100% <100%> (ø) :arrow_up:
phylib/io/alf.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 92e9693...2d071dc. Read the comment docs.