Neuralynx Data File Formats
Neuralynx acquisition software, Cheetah, saves data in several different formats. It is important to understand the overall structure to make writing of programs easier and their use more effective. The two main sections of each file type are the File Header and the File Data. The Header (16kByte fixed size text) contains the system settings and data attributes when the file’s data was originally recorded and can be viewed using most text editors as well as Neuraview. The File Data section begins immediately following the Header and is stored as a sequence of individual records in binary format. These formats including the size and data contained in each record depend on the type of acquisition entity you are recording, and include: .nse (single electrode), .nst (stereotrode), .ntt (tetrode), .ncs (continuously sampled), .nvt (video tracking), .nrd (raw data), and .nev (events).
CSC (.ncs) files are formed from 512 samples. The timestamp is on the first sample of that record. This occurs regardless of the sample rate. If recording at 32kHz, each record of 512 samples is 16ms. If subsampling down to 16kHz, then each record contains 32ms of data, but still with 512 samples. A further dive into this filetype is available below.
Spike files (.nse, .nst, .ntt) are made up of 32 samples. Each will contain a 32 sample data structure X the number of electrodes. The same rules apply here as they do with CSC files and subsampling.
The timestamp of spike records is on the alignment point set in Cheetah, typically the 8th sample.
Event (.nev) files timestamp each event input from either manual input from the Event Window/NetCom commands or by the transition of a TTL input/output through the digital I/O port of the acquisition system.
Raw Data (.nrd) files have a timestamp per sample per channel. By default, Cheetah does not record this file structure and it must be manually enabled from the Recording Options window in the acquisition software. The NRD file is a large data set that requires a separate hard drive to record the data to. These files can be replayed through the acquisition software and many settings can be altered to achieve the desired output.
Video Tracking (.nvt) files are primarily used for X and Y coordinate tracking of the subjects head position and orientation. Additional information is contained in the video file structure that can be used for additional tracking and analysis.
The following example shows the Header and Data of a CSC file (.ncs extension) using Cheetah 6.4.2 in the Neuraview application.
CSC File Header:
######## Neuralynx Data File Header
-FileType NCS
-FileVersion 3.4
-FileUUID 8eabca59-2d5f-4127-b986-b6b1d5c34fb4
-SessionUUID 9737cd11-d70d-4ee8-be5b-cf74cc9c4fbe
-ProbeName
-OriginalFileName “C:\CheetahData\2025-01-06_12-54-25\CSC1.ncs”
-TimeCreated 2025/01/06 12:54:26
-TimeClosed 2025/01/06 12:58:55
-RecordSize 1044
-ApplicationName Cheetah “6.4.2 Development”
-AcquisitionSystem AcqSystem1 DigitalLynxSX
-ReferenceChannel “Source 01 Subject Ground”
-SamplingFrequency 32000
-ADMaxValue 32767
-ADBitVolts 0.000003051757812500000169
-AcqEntName CSC1
-NumADChannels 1
-ADChannel 0
-InputRange 100000
-InputInverted True
-DSPLowCutFilterEnabled True
-DspLowCutFrequency 0.1
-DspLowCutNumTaps 0
-DspLowCutFilterType DCO
-DSPHighCutFilterEnabled True
-DspHighCutFrequency 8000
-DspHighCutNumTaps 256
-DspHighCutFilterType FIR
-DspDelayCompensation Enabled
-DspFilterDelay_µs 3984
The Header includes useful information such as type of file, version of Cheetah and type of system used, sampling frequency, input range, filter settings, and ADBitVolts value. The ADBitVolts value is important when importing data into another analysis tool such as MATLAB®. The value indicated is the multiplier used in conjunction with the A/D value stored in each record from each sample. For example:
(Index 4: Sample4 value= 7352) x (ADBitVolt value= 0.000003051757812500000169) = 0.0224365234375Volts or 22436.52 µV
CSC File Data:
The File Data of a CSC is broken into indices, starting at 0 (first record) and running continuously until the recording is paused or ended. Each Index is equal to one record. Each record contains the following information: Timestamp, acquisition channel number, sampling frequency, number of valid samples in the record, and the 512 individual samples of that record (example image below). The Timestamp is a 64-bit unsigned integer (quad-word) in units of microseconds. In the example below, records have a Timestamp difference of ~16,000 microseconds – the record size (512) divided by the sampling rate (32,000 Hz). If recording is paused during an experiment, there will be a large gap between records’ Timestamps. For example, if recording was stopped for 30 seconds, there will be a 30 million microsecond difference in Timestamp values around the gap.
File Header and record data must be used together while performing data analysis. For more information on file structures, please refer to Cheetah Reference Guide, Neuralynx File Formats, and Neuraview Quick Start Guide, or contact support@neuralynx.com. MATLAB is a registered trademark of The MathWorks, Inc.
Caution – Cheetah software for investigational use in laboratory animals or other tests that do not involve human subjects.
Rev. A0