# Timestamp correction

After you stop a recording, EmotivPRO performs a post processing operation called timestamp correction. The purpose is to adjust the EEG timestamps that were calculated in real-time and make them more accurate. This operation is done automatically, you have nothing to do.

When you [export a recording](/emotivpro-v3/managing-your-eeg-data-recordings/exporting-an-eeg-data-recording.md) to a CSV file, you will have 2 columns:

* the column "OriginalTimestamp" stores the timestamps that were calculated in real-time
* the column "Timestamp" stores the improved timestamps that were calculated by the timestamp correction algorithm

This feature was added in EmotivPRO v3.1. The recordings created with EmotivPRO v3.0.1 or earlier won't have corrected timestamps, even if you export them with EmotivPRO v3.1.

## How does it work?

The time difference between the time that the electrical potential is measured in the headset and the time that the EEG data is processed inside Cortex varies from 80 milliseconds to up to 140 milliseconds. The variation in arrival time depends on the quality of the wireless connection between the headset and the computer. This makes it difficult to accurately set the timestamp of each individual EEG sample in real time. To handle these variations in arrival times, Cortex makes the timestamp of the current EEG sample as close as possible to the current real time while at the same time ensuring that the difference between neighboring timestamps is as constant as possible. The rate that the EEG data is sampled in the headset is constant. Therefore we are able to correct the real-time timestamps by using this fact.

After the completion of the recording, Cortex fits the timestamps to a new set of timestamps where the time step between each EEG sample is equal. If the wireless connection between the headset and the computer is of poor quality, the correction of the timestamps can be unsuccessful. If the algorithm fails to correct the timestamps, that does not mean that the timestamps are not correctable, only that the automatic algorithm could not guarantee the accuracy of the correction. The user may wish to attempt to manually fit the timestamps to an equispaced set of timestamps if the correction fails and they require accurate timestamps for a particular recording.

If this correction is successful, the original real-time timestamps are saved in the “OriginalTimestamps” column and the new corrected timestamps are stored in the “Timestamp” column. The accuracy (jitter) of the timestamps before the correction is (depending on the wireless connection quality) between +- 4ms and +- 30ms. The accuracy (jitter) of the corrected timestamps is +- 0.5ms. The systematic error in the timestamps is approximately +- 5ms for both the corrected and uncorrected timestamps.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emotiv.gitbook.io/emotivpro-v3/managing-your-eeg-data-recordings/timestamp-correction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
