You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add _get_signal_t_stop(block, seg, stream) to the rawio base API #1837
The rawio base class exposes _get_signal_t_start(block_index, seg_index, stream_index) as a per-stream refinement of _segment_t_start, but there is no per-stream counterpart for t_stop. The only stop-time API is _segment_t_stop(block_index, seg_index), which returns a single value per segment. For formats where streams within a segment can have genuinely different stop times (SpikeGLX imec vs nidq vs OneBox on independent hardware clocks, Blackrock PTP across mixed devices, any multi-device setup), this forces the rawio implementation to collapse across streams somewhere, which loses information that callers could otherwise use for accurate per-stream alignment. Concretely in SpikeGLXRawIO._parse_header, the current code computes t_stop per (stream, segment) as sample_length / sampling_rate and then takes max across streams to produce a single per-segment value, silently discarding the per-stream differences:
I think the right fix is additive: add _get_signal_t_stop(block_index, seg_index, stream_index) -> float to the base class, mirroring _get_signal_t_start exactly. Formats where streams share a clock can implement it trivially or delegate to _segment_t_stop.
Activity