Add check_spike_times_without_nans - #689
Conversation
for more information, see https://pre-commit.ci
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
for more information, see https://pre-commit.ci
|
This looks good to me. One minor concern is that as recordings get bigger, both Typical large recording today:
Some labs are doing many-hour recordings, so on the order of 1e9 spike times is plausible. With 1e9 spike times:
On my Mac M1 laptop, it would take about 35 seconds to read gzip-compressed I think that's OK, but something to keep in mind as data gets bigger. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #689 +/- ##
==========================================
+ Coverage 79.44% 82.87% +3.43%
==========================================
Files 48 48
Lines 1897 1904 +7
==========================================
+ Hits 1507 1578 +71
+ Misses 390 326 -64
🚀 New features to boost your workflow:
|
Spike times are physical event timestamps representing when action potentials occurred. A spike either happened at a specific time or it didn't, so NaN is never a meaningful value. NaN in spike times typically indicates a conversion bug or array padding that was not cleaned up before writing to NWB.
Unlike other spike time checks that sample the first N elements, this check scans the full array because NaN values can appear at any position in the data.