Update spike time calculations for scattered non-spiking units#1871
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.77% +0.01%
==========================================
Files 87 87
Lines 12788 12805 +17
==========================================
+ Hits 9816 9831 +15
- Misses 2972 2974 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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 |
|
@yarikoptic ping again |
yarikoptic
left a comment
There was a problem hiding this comment.
coolio, thanks! filed
for longer term. IMHO we seems to be getting too much "analytical" here ;)
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.