Skip to content

Commit

Permalink
Merge branch 'feature/gaze_from_csv' of https://github.com/aeye-lab/p…
Browse files Browse the repository at this point in the history
…ymovements into feature/gaze_from_csv
  • Loading branch information
prassepaul committed Sep 15, 2023
2 parents 4397cb9 + 5aa980a commit e4575b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions tests/gaze/io/csv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,24 @@
('kwargs', 'shape'),
[
pytest.param(
{'file': 'tests/gaze/io/files/monocular_example.csv',
'time_column': 'time', 'pixel_columns': ['x_left_pix', 'y_left_pix']},
{
'file': 'tests/gaze/io/files/monocular_example.csv',
'time_column': 'time', 'pixel_columns': ['x_left_pix', 'y_left_pix'],
},
(10, 2),
id='csv_mono_shape',
),
pytest.param(
{'file': 'tests/gaze/io/files/binocular_example.csv',
{
'file': 'tests/gaze/io/files/binocular_example.csv',
'time_column': 'time',
'pixel_columns': ['x_left_pix', 'y_left_pix', 'x_right_pix', 'y_right_pix'],
'position_columns': ['x_left_pos', 'y_left_pos', 'x_right_pos', 'y_right_pos']},
'position_columns': ['x_left_pos', 'y_left_pos', 'x_right_pos', 'y_right_pos'],
},
(10, 3),
id='csv_bino_shape',
),
]
],
)
def test_shapes(kwargs, shape):
gaze_dataframe = pm.gaze.from_csv(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion tests/gaze/io/files/binocular_example.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ time,x_left_pix,y_left_pix,x_right_pix,y_right_pix,x_left_pos,y_left_pos,x_right
0,0,0,0,0,-23.104783, -13.489493,-23.104783, -13.489493
0,0,0,0,0,-23.104783, -13.489493,-23.104783, -13.489493
0,0,0,0,0,-23.104783, -13.489493,-23.104783, -13.489493
0,0,0,0,0,-23.104783, -13.489493,-23.104783, -13.489493
0,0,0,0,0,-23.104783, -13.489493,-23.104783, -13.489493
2 changes: 1 addition & 1 deletion tests/gaze/io/files/monocular_example.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ time,x_left_pix,y_left_pix
0,0,0
0,0,0
0,0,0
0,0,0
0,0,0

0 comments on commit e4575b5

Please sign in to comment.