Loading...

Concepts

Concepts

Nodes

A Synapse device's capability is defined by the set of nodes it supports. Nodes come in a range of flavors: from Electrical Broadband to read from electrodes, or Optical Stimulation to write to light sources, to Stream Out to forward data to a multicast group. A full list of nodes and their configuration options can be found in the Node Reference.

Signal Chain

By default, a Synapse device will do nothing when started. You must define a data flow from signal sources to sink for the device to run by chaining together source and sink nodes—and optionally interstitial nodes.

You can add nodes with the config.add_node(node) command and connect them with the config.connect(node1, node2) command. A typical electrical recording signal chain would include the following four nodes, but their exact arrangement and number is not prescriptive:

  1. an Electrical Broadband node to ingest raw electrical voltages.
  2. a Spectral Filter node to remove extraneous signals from the raw data.
  3. a Spike Detect node to translate the analog signal into a digital one.
  4. a Stream Out node to transmit the digital signal externally.

After you have configured the signal chain, you can update the underlying hardware to the current state by calling device.configure(config). The term "configuration" may be used interchangeably with "signal chain" in these docs when the context is not otherwise ambiguous.

Linear vs. Branching Signal Chains

Signal chains are not required to be perfectly linear; a single data source node can output to multiple data sinks or a single sink can accept from multiple data sources. The config.connect(node1, node2) command can be repeated for each connection.

Status Messages

Synapse uses compliant implementations to evaluate if a user-constructed signal chain is valid for a given device:

  • Are the nodes available on the device?
  • Do the nodes have sufficient bandwidth to be chained together?
  • Do all signal chains have a Stream In or Stream Out node?

If a Synapse device receives an invalid configuration, the DeviceInfo status’s message and code fields will be updated with the relevant error message and code.

Status Code Status NameDescription
0kOkNot an error; returned on success.
1kUndefinedErrorUnknown error.
2kInvalidConfigurationThe client specified an invalid signal chain. Note that this differs from kFailedPrecondition because kInvalidConfiguration indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
3kFailedPreconditionThe operation was rejected because the system is not in a state required for the operation's execution.
4kUnimplementedThe operation is not implemented or is not supported/enabled in this service.
5kInternalErrorInternal errors. This means that some invariants expected by the underlying system have been broken.
6kPermissionDeniedThe request does not have valid authentication credentials for the operation.
7kQueryFailedThe query failed because the data received was incoherent.

Peripherals

Peripherals are hardware like ASICs, which can be used by nodes to collect, process, and transmit data. You can use our Nixel or Pixel chips or your own peripherals thanks to Synapse's flexibility. An example of a Synapse-Cereplex driver is available here for reference.

Not every node type corresponds to a peripheral, though all of the broadband and stimulation nodes do require one. Nodes which map to peripherals require the peripheral ID to be specified at time of configuration. Peripherals are autodiscovered via the device.info() command and each peripheral has a unique set of configuration options that are configured when their respective Synapse node is created.