Skip to product information
1 of 4

The Barcoder

The Barcoder

Regular price $100.00 USD
Regular price $150.00 USD Sale price $100.00 USD
Sale Sold out
Quantity
View full details

Why you need this

Your experiment involves multiple pieces of recording equipment with their own software packages that don't talk to each other. For example, you might be using a PXI board for acquiring Neuropixels data with a separate auxiliary data acquisition board (e.g., NIDAQ).

You need to accurately synchronize recorded data or events across these systems.

What it does

The Barcoder provides a common concept of time across all of the devices that form your experimental setup. It splits barcode outputs through standard BNC cables to all of your data acquisition devices, which record the barcodes along with whatever other data those devices capture. After your recording session, our Python library identifies the barcodes in each recording and converts timestamps from one system into the "time zone" of another.

Up to 500 ms of drift in 9 minutes.
That is what we measured across two similar devices commonly used in real neuroscience experiments. See the real-world example.

How it works

The Barcoder outputs a different unique barcode every 5 seconds. Each barcode encodes a 16-bit number as a series of 16 pulses that alternate between high and low. The number is not encoded by whether a pulse is high or low. Rather, the length of each pulse is either 10 ms or 5 ms: long pulses encode ones and short pulses encode zeros.

This type of code is much easier to decode reliably than one that sets a TTL line high to encode "one" and low to encode "zero", because the boundaries between consecutive bits are explicit rather than implicit (compare the string of six consecutive 1's in A. vs B. in the figure below). Our post-processing code automatically detects the barcodes, matches them between recordings from multiple devices, and converts timestamps between recordings.

Graded comparison of synchronization strategies

Synchronization techniques, graded A to F. A. A barcode generated by the Barcoder. Each bit is reliably decodable, even if you don't know the sampling rate. B. A barcode from other devices: a start marker followed by a sequence of consecutive high or low bits. Where do these bits start and stop? Confusing, potentially disastrous. C. A simple synchronization pulse every five seconds allows alignment between devices, but fails catastrophically if data are missing or frames are dropped. F. Too many experiments are still performed with no directly encoded synchronization at all, relying instead on the intrinsic timing accuracy of every individual component of the system.

In most devices, sampling rates are not exactly as stated, leading to desynchronization between devices. Even the smallest deviation in sampling rate diverges linearly with time.

Example: Neuropixels and OpenEphys

Consider recording from Neuropixels probes using the OpenEphys software. Your experiment involves a data acquisition chassis that contains an IMEC card that reads from the Neuropixels and a NI-DAQ card that records auxiliary signals. Unfortunately, these are captured as different "streams" with no common timebase, so it is impossible to accurately align events captured by the NI-DAQ card with the spikes recorded with the Neuropixels probe.

We at Pasadena Neurotech are enormous fans of OpenEphys, but we must caution that it is dangerously easy to load and analyze these data streams as though they are already aligned.

The Barcoder solves this problem. If you connect its output to the single digital input of the IMEC card as well as to the #1 digital input on the NI-DAQ card, you can do this:

!pip install ephysio

from ephysio import openephysio

expt = openephysio.Loader("/path/to/your/data")
spike_stream = expt.spikestream()
events = expt.nidaqevents(spike_stream)

The resulting events is a dictionary containing the timestamps of all digital events captured on the NI-DAQ card, converted into spike stream time. Likewise,

lfp_stream = expt.lfpstream()
lfp_events = expt.nidaqevents(lfp_stream)

returns those same events converted to the time units of the LFP stream.

What you get

Trivially easy. You may have ways to connect time series across devices by cross-matching identifiable events, but this is cumbersome and not necessarily reliable. The Barcoder is trivially easy to use and removes any question of reliability.

Resilient to dropped data. We all know that experimental recordings aren't always perfect. You load your data and find that the number of stimuli captured in the recording is not quite the number you provided. Something is off, but what? Perhaps a segment of time got dropped, or the stimulator stopped working for a while. With the Barcoder, you have a much better chance to reconstruct what happened, because all your data are tagged with unambiguous timestamps. If an individual barcode is broken by one of your recording devices, the Barcoder software will detect this and can still use the other barcodes to reconstruct the timeline.

Compatibility

The 5-V output from the Barcoder is compatible with devices from the vast majority of vendors, including our own picoDAQ. If you are uncertain of compatibility with your particular equipment, we will be happy to investigate.