aeye-lab / pymovements

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

feat!: add time column if missing during gaze initialization #654

Closed dkrako closed 5 months ago

dkrako commented 5 months ago

Description

During development of #382 I encountered potential bugs if there is no time column present. For a robust implementation we need to guarantee that a time column exists.

Depends on #650 for pydocstyle ignores

Implemented changes

During initialization, there's an if clause that checks for a passed time column. If there is none, one will be created with pl.arange(0, len(self.frame))

How Has This Been Tested?

Checklist:

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a526dd0) 100.00% compared to head (98dc8af) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #654 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 54 54 Lines 2362 2366 +4 Branches 589 590 +1 ========================================= + Hits 2362 2366 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SiQube commented 5 months ago

merge conflict

dkrako commented 5 months ago

I improved on the timesteps creation by taking account of the experiment sampling rate to create timesteps in millisecond unit.

SiQube commented 5 months ago

merge conflict