Skip to content

feat(datatype): add SpiketrainFrame for SpikeBinner node output - #84

Merged
namthor9 merged 2 commits into
mainfrom
feat/spiketrain-frame
Sep 24, 2026
Merged

namthor9 merged 2 commits into
mainfrom
feat/spiketrain-frame

Conversation

@namthor9

Copy link
Copy Markdown
Contributor

Summary

Adds synapse.SpiketrainFrame to api/datatype.proto, the output message for the SpikeBinner node. There was previously no message for binned spiketrains, so the binner could not exist and Nexus had nothing to view.

Changes

  • New SpiketrainFrame message: timestamp_ns (bin start, same clock as BroadbandFrame.timestamp_ns), sequence_number, bin_size_ms, spike_counts (one per channel), channel_ids (empty = contiguous 0..n-1, same convention as BroadbandFrame.channel_ranges), unix_timestamp_ns.
  • The binner emits one frame per bin on a fixed cadence, including all-zero bins, so a consumer can tell "silent" from "not streaming". sequence_number gaps mean dropped bins.
  • VERSION → 2.5.0. Additive only, no breaking changes.

Testing

  • Compiles under pbjs; round-tripped through encode/decode in synapse-typescript.
  • Not tested against hardware.
  • No synapse-python reference yet (simulator / synapsectl support is a follow-up).

Merge order

This is first in the chain; the synapse-typescript, headstage, and nexus-desktop PRs all depend on it.

⚠️ Conflicts with main on VERSION (main is now 2.4.3 after #83). Needs a rebase. 2.5.0 still works as the new version. After the merge, the synapse-typescript and headstage submodule pointers (currently on 07cc0a3) need moving to the merged commit.

The SpikeBinner node emits one bin of per-channel spike counts at a fixed
cadence. There was no message for it -- DataType.kSpiketrain existed with
nothing to carry over the wire -- so the node could not be tapped and
nexus-desktop's binned-spike viewer had nothing to decode.

Bins are emitted even when empty so a consumer can tell a silent channel
apart from a stalled stream.

Bumps VERSION to 2.5.0 (additive message, no breaking change).
@calvinleng-science

Copy link
Copy Markdown
Contributor

rebase first, then lgtm

@calvinleng-science calvinleng-science left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@namthor9
namthor9 merged commit 065ff8c into main Sep 24, 2026
2 checks passed
@namthor9
namthor9 deleted the feat/spiketrain-frame branch September 24, 2026 00:10
namthor9 added a commit to sciencecorp/synapse-typescript that referenced this pull request Sep 24, 2026
Points the submodule at 065ff8c (sciencecorp/synapse-api#84, merged).
Bumps the package to 2.4.0 for a manual publish; release-please was
removed in #51, so it will not do this.
namthor9 added a commit to sciencecorp/synapse-typescript that referenced this pull request Sep 24, 2026
…55)

* feat(api): bump synapse-api to 2.5.0 for SpiketrainFrame

Picks up the new synapse.SpiketrainFrame message, which the SpikeBinner
node's tap publishes and nexus-desktop's binned-spike viewer decodes.

package.json is left to release-please; src/api and dist are generated.

* chore: point synapse-api at merged #84 and bump version to 2.4.0

Points the submodule at 065ff8c (sciencecorp/synapse-api#84, merged).
Bumps the package to 2.4.0 for a manual publish; release-please was
removed in #51, so it will not do this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants