Update spike time calculations for scattered non-spiking units#1871
Update spike time calculations for scattered non-spiking units#1871CodyCBakerPhD wants to merge 7 commits into
Conversation
…ther non-spiking units Fix bug in spike time handling by using unique indices.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1871 +/- ##
==========================================
+ Coverage 76.75% 76.79% +0.03%
==========================================
Files 87 87
Lines 12788 12805 +17
==========================================
+ Hits 9816 9833 +17
Misses 2972 2972
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot Please add one new test for this case (of having multiple non-spiking units scattered throughout the rows of a untis table) |
Removed unused imports for metadata extraction.
Removed unnecessary import statements for get_metadata in multiple test cases.
Remove unnecessary blank line before assertions.
Added in commit |
|
@yarikoptic I recommend merging #1872 first |
|
@yarikoptic OK ready - a user needed this to upload some data |
Update session duration spike-time boundary handling to correctly support multiple non-spiking units scattered throughout a Units table, not just when the first unit is non-spiking.
The implementation now keeps only unit boundaries where cumulative spike count increases, which avoids invalid indexing from repeated boundaries contributed by non-spiking rows while preserving correct min/max spike-time extraction.
Also adds a regression test covering interleaved spiking and non-spiking unit rows to validate the expected session duration behavior.