Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Open Ephys data format (version 0.4)

Headers

All headers are 1024 bytes long, and are written as a Matlab-compatible string. Therefore, loading the header (regardless of its content), can be done with three lines of code:

...

  • field names appear after a "header." prefix
  • field names and values are separated by " = "
  • the value of the field is in plain text, with intended strings enclosed in single quotes (as demonstrated above)
  • each line is terminated with a semicolon

Continuous data files (.continuous)

Each continuous channel within each processor has its own file, titled "XXX_CHY.continuous," where XXX = the processor ID #, and Y = the channel number. For each record, it saves:

...

If a file is opened or closed in the middle of a record, the leading or trailing samples are set to zero.

 Event files (.events)

Non-spike events are saved in a different format. Events generated by all channels are dumped into the file "all_channels.events" with the following data for each event:

  • int64 timestamp (to align with timestamps from the continuous records)
  • int16 sample position within a buffer
  • uint8 event type (all the events that are saved have type TTL = 3 ; Network Event = 5)
  • uint8 processor ID (the processor this event originated from)
  • uint8 event ID (code associated with this event, usually 1 or 0)
  • uint8 event channel (the channel this event is associated with)
  • One uint16 recording number (version 0.2 and higher)

Spike files (.spikes)

Data from each electrode is saved in a separate file. The filename is based on the name of the electrode itself, but without spaces (e.g., "Tetrode1.spikes").

...

Since the samples are saved as unsigned integers, converting them to microvolts involves subtracting
32768, dividing by the gain, and multiplying by 1000.

Reading data into Matlab

Here's some example code for loading the first record from a data file called `102_CH1.continuous`:

...