-
Notifications
You must be signed in to change notification settings - Fork 176
data and timestamp length unequal using load_open_ephys_binary #106
Comments
The timestamps are 64-bit integers that represent the sample numbers relative to the start of acquisition. If you are acquiring data at 40kHz and start recording 10 seconds after starting acquisition, the first timestamp written to disk would be 10 seconds x 40,000 samples / second = 400,000. If you then record for a total of 5 seconds, the final timestamp would be 400,000 + 5 * 40,000 = 600,000. This is why the final timestamp can be greater than the duration of the recording. The unequal timestamps vs. data is due to using independent buffers to process the different data types (int64 and int16 respectively). The timestamps buffer can stop buffering faster than the data buffer at the end of recording resulting in a few extra data samples. If you have N total recorded timestamps at the end of recording and the first recorded timestamp is exactly the last recorded timestamp minus N, then the N recorded timestamps map directly to the first N samples recorded. If you have any gaps in the timestamps larger than 1 this suggests your computer was not able to keep up with the data processing during recording. |
Thank you. I think I understand the timestamps, however, how am I to match the length of data with the length of timestamps? Is the data also int64 or int16? I apologize for the questions, I'm just trying to preprocess my open ephys.dat file and have been struggling to do this via matlab. Any assistance would be appreciated. Thank you! |
The timestamps are int64 and the data is int16. Depending on your recording device there will be a bitVolts value to convert the data from int16 to float representing voltage. To match the timestamps length with the data length, simply discard the extra data samples. Which version of the GUI was used for these recordings and which device did you record from? (ex: Neuropixels, OpenEphys Acquisition board, etc.). If possible can you attach the settings.xml file from your recording? |
Open Ephys v0.5.4 recorded on an Intan Acquisition board. settings.xml file https://drive.google.com/file/d/1K9TcWSIItE1wfXiAPB211nyhh23HKI7e/view?usp=sharing |
Trying to process binary.dat data using load_open_ephys_binary.
I'm given unequal timestamps and data (i.e. 35553218 ts and 36001201 data)
Additionally, I'm not sure what the timestamps actually mean as it doesn't represent time. It seems as though it might be an index, but the max index is larger than the max length of data.
Please clarify this for me. Thank you.
The text was updated successfully, but these errors were encountered: