Untethered Recordings Using Datalogging Headstages


Overview

Many SpikeGadgets headstages have the ability to record neural data in both tethered and untethered modes. This means a single system can be used for both standard recordings using a wire tether as well as completely wire-free recordings, enabling a wide range of experiments that could not be accomplished with a wire tether.

Note: For information about using the Sprite32 and Pixie384 headstages, please visit the wiki page about 2-Way Radio Link.

During tethered recording, the headstage is connected to the MCU via HDMI tether. The tether powers and controls the headstage, streaming data back to the computer via a control unit. The neural and sensor data from the headstage is combined with any video timestamp data or signals recorded using the digital or analog inputs and outputs and saved to file.

When recording in untethered mode, the headstage acts as a self-contained acquisition system operating under battery power, saving neural and sensor data to SD storage mounted to the headstage. This means that data about the environment (lever presses, beam breaks, video, lights, sounds) must be recorded separately by the control unit. These two data streams must then be aligned and merged to create a single data file. SpikeGadgets systems use radio frequency (RF) synchronization signals to align data when merging. Here we will cover how this works, and how the Trodes toolbox performs this critical data alignment operation.

Synchronization

Synchronization between the environmental data recorded by Trodes via the control unit, and the neural data recorded on the headstage is accomplished using an RF sync signal sent at a regular interval. The sync signal is transmitted by the control unit, and received by the headstage. The control unit sends this signal at a 2 Hz interval. The frequency with which headstages can receive these signals is ~1 Hz (950ms).

This RF signal is sent from the control unit that acquires the environmental data and connect to your computer. This can be either the Main Control Unit or the Logger Dock. The RF syn signals are recorded by both the control unit and the headstage with the same precision as neural data (generally, 20kHz or 30kHz). This allows for high alignment precision when merging neural and environmental data following the experiment.

NOTE: Environmental data can be viewed in Trodes in real-time while recording, but neural data recorded to the headstage cannot be viewed or accessed during recording.

Following each untethered recording you will have 2 files: one containing neural data recorded to the headstage SD card, and one containing the environmental data recorded to your local computer. These files will be aligned using the RF synchronization signals saved to both data files mentioned above.

Importantly, RF sync signals are critical for maintaining high precision timing. Trodes uses a local alignment algorithm to align neural and enviromental data at each shared sync signal. This ensures high precision alignment over long record times as it limits the period of time over which drift can occur.

Video data captured using the Camera Module in Trodes can also be aligned to the neural and environmental data. The Camera Module which records the video frame timestamps using the same sampling rate as the neural and environmental data. These timestamps can be used to align the video frames to the neural and environmental data. Camera Module setup for untethered recording is the same as it is when recording tethered. More information about Camera Module setup can be found here.

Recording

When recording untethered, environmental data is recorded by the control unit, and neural and sensor data is recorded by the headstage. A “zero channel” workspace should be used for recording environmental data using the control unit. This is done by creating a workspace with the Amplifier/probe technology setting set to “None (environmental recording only).” Hit the left arrow button under the Amplifier/probe technology section, then click “select” to choose this option during workspace creation.

None(environmental recording only)

The headstage and control unit must also be set to the same RF channel and sampling rate, and session ID mode should be turned on for both. This will ensure that the headstage can be properly controlled by the MCU/Logger Dock; receiving Start/Stop commands and RF sync signals throughout the recording session.

If you are also using an Environmental Control Unit (ECU) when recording, this must be added to your hardware devices when creating your zero-channel Workspace in the Workspace Editor.

Untethered Recording Video Tutorials

The following video tutorials cover untethered recording from setup to data extraction using the HH128 as an example.

Setting up an Untethered Data Logging Experiment:

These steps provide an overview of basic setup for untethered recording. User manuals containing Headstage-specific setup instructions can be found on the SpikeGadgets documentation page.

  1. Open Trodes and either create a new workspace “From Scratch” under the Create/Edit Workspace menu or open the workspace you have already created.

  2. Connect your headstage to the MCU via HDMI, and link your MCU to Trodes using the “Connection” dropdown menu by selecting: Source > SpikeGadgets > USB OR Ethernet.

  • Your SD card should not be inserted into the headstage yet.

  1. Under the “Settings” dropdown menus, set the MCU and headstage RF channel and sampling rate to the same values and select the session ID mode checkbox for both:

MCU: Settings > MCU Settings…

Headstage: Settings > Headstage Settings…

  1. Apply your settings above, then save your Workspace. This Workspace can be used later as the basis for the Workspace used to merge your neural and environmental data.

Initiating an Untethered Recording:

  1. Disconnect your headstage from the MCU, connect the headstage to battery power, insert your enabled SD card into the headstage and power the headstage on.

  1. Open Trodes and create a new Workspace with Amplifier/probe set to None. This workspace will be used to acquire the environmental record.

  2. If you are using an Environmental Control Unit (ECU), make sure this is connected to your MCU via HDMI. Your ECU must also be added to your

Workspace by selecting “ECU” from the Hardware Devices dropdown menu, then clicking “+Add Device.”

  1. Connect your RF transceiver to the Aux 1 port on the front of the MCU.

  2. Open your workspace, connect to your MCU, and set your RF channel and sampling rate to match the settings you previously applied to your headstage settings, also making sure Session ID mode is checked.

  3. When you are ready to begin recording, select “Stream from source” from the Connections menu. This will trigger the headstage to begin recording.

  4. To initiate recording with the MCU, select “New Recording…” from the File dropdown menu and select your recording directory.

  5. Hit the red “record” button to begin recording your environmental record with the MCU.

  6. To end your recording, hit the pause button, and disconnect your stream.

IMPORTANT NOTE: The headstage will start recording when you begin streaming with the MCU, but the MCU will NOT start recording until you create a new recording file and hit the record button in Trodes. The same holds true for ending your recording; the MCU recording can be ended or paused using the interface buttons, but the headstage recording is ended by disconnecting your stream.

When using the Logger Dock to record, the Logger Dock RF channel and Session ID mode settings are configured by opening the DataLoggerGUI, selecting the Logger Dock entry that will appear under the “Detected Storage Devices” menu, then clicking the “Edit dock settings” button to the upper right. You will find the RF channel and session ID settings in this pop-up menu.

Transferring Data to Computer and Merging Files

Once your untethered recording session has ended, the data recorded by both systems will need to be merged before further processing and analysis will be possible. Three files are required for merging the data:

  1. The neural data file recorded to SD

  2. The environmental data file recorded to your computer

  3. A Workspace file to be appended to the merged data.

The Workspace file required should contain all the settings that would have been used if the recording had been taken in tethered mode. This Workspace will include accurate channel count and nTrodes mapping from your headstage AND any settings relevant for recording the environmental record, such as the ECU being added to your Workspace Hardware Device list. Once you have these files, the data can be merged using the Data Logger GUI application that can be found in the Trodes directory. More information about the merging process and Data Logger GUI can be found here.