aeye-lab / pymovements

A python package for processing eye movement data
https://pymovements.readthedocs.io
MIT License
57 stars 11 forks source link

use corrected timestamps when parsing 2000Hz eyelink data #688

Open dkrako opened 4 months ago

dkrako commented 4 months ago

Description of the problem

In case of 2000 Hz eye link recordings, the timestamps of the second sample of each millisecond are the same as the first.

Example: raw timestamps: 1000, 1000, 1001, 1001, 1002, 1002

but they should rather be: 1000.0, 1000.5, 1001.0, 1001.5, 1002.0, 1002.5

Description of a solution

In case of a sampling rate of 2000 Hz, the timestamps should be postprocessed after parsing.

Naturally, the second appearance of the same timestamp value should be incremented by 0.5.

In case a timestamp appears just once we have an edge case:

The edge case is not that important and can be migrated to a follow-up issue if desired.

Minimum acceptance criteria

behinger commented 1 month ago

(toolbox looks great!!)

two minor comments: