Repository navigation
feat: expose native SpikeGadgets timestamps privately - #1949
Draft
DanceoftheAurora wants to merge 2 commits into
Draft
DanceoftheAurora wants to merge 2 commits into
DanceoftheAurora wants to merge 2 commits into
Conversation
Return a read-only uint32 packet-tick view with slice bounds. Preserve native starts, gaps, rollover and resets; signal timing and parse behavior are unchanged. Add generated-file tests and contributor attribution. AI-assisted implementation; focused and offline core/RawIO tests executed. Partial step toward NeuralEnsemble#1856.
Retain both author entries in the sole manual conflict. Accessor implementation and tests are unchanged. Validation: 3 focused tests and 10 subtests pass with Python 3.11.16 and NumPy 2.4.6. Prepared with AI assistance.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SpikeGadgets packets contain a uint32 acquisition tick that callers currently cannot retrieve through a timestamp accessor. This draft adds
_get_spikegadgets_timestamps(i_start=None, i_stop=None), returning a read-only view of the stored little-endian ticks. For example,[100, 101, 103, 104]remains exactly that sequence, so a downstream caller can inspect the missing tick directly.This is the accessor step of #1856, following the private-accessor precedent in #1816 and the native-format direction in #1773. Tick values retain their original units, initial value, gaps, rollovers and resets. The method uses Intan's optional slice arguments; SpikeGadgets currently has one block and one segment, with one packet tick shared by its signal streams. The name and signature remain private while the common timestamp API is being developed.
Continuity detection and gap handling remain future work: parsing, nominal signal times and segmentation keep their current behavior. This PR therefore does not resolve #1856's silent timing problem. It provides the native data needed for that work without adding an unused validator or a new read option.
Validation on macOS arm64, Python 3.12.14 and NumPy 2.5.4:
git diff --checkpassed. Windows was not available locally; synthetic-test cleanup explicitly closes mappings before deleting files.Prepared with AI assistance; the synthetic fixtures and reported checks were run locally. No external recordings were downloaded for this change.