diff options
author | Théo de la Hogue | 2022-11-16 15:51:05 +0100 |
---|---|---|
committer | Théo de la Hogue | 2022-11-16 15:51:05 +0100 |
commit | 3fe78a78645ce8c013b21061fc7847551f8a9a2d (patch) | |
tree | f008007e9ece0159862d19d8df2c30df49a57f94 | |
parent | 311e9cbe8456a7f634c89a24dc02178337b6aa37 (diff) | |
download | argaze-3fe78a78645ce8c013b21061fc7847551f8a9a2d.zip argaze-3fe78a78645ce8c013b21061fc7847551f8a9a2d.tar.gz argaze-3fe78a78645ce8c013b21061fc7847551f8a9a2d.tar.bz2 argaze-3fe78a78645ce8c013b21061fc7847551f8a9a2d.tar.xz |
Updating DataStructures.py changes.
-rw-r--r-- | src/argaze/GazeFeatures.py | 6 | ||||
-rw-r--r-- | src/argaze/utils/tobii_segment_aruco_aoi_export.py | 2 | ||||
-rw-r--r-- | src/argaze/utils/tobii_segment_gaze_movements_export.py | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index 3f4ef29..bc1b91e 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -87,8 +87,8 @@ class Movement(): def __post_init__(self): - start_position_ts, start_position = self.positions.get_first() - end_position_ts, end_position = self.positions.get_last() + start_position_ts, start_position = self.positions.first + end_position_ts, end_position = self.positions.last self.duration = round(end_position_ts - start_position_ts) @@ -347,7 +347,7 @@ class VisualScanGenerator(): return df - def export_as_csv(self, filepath): + def save_as_csv(self, filepath): """Write buffer content into a csv file.""" try: diff --git a/src/argaze/utils/tobii_segment_aruco_aoi_export.py b/src/argaze/utils/tobii_segment_aruco_aoi_export.py index 3f75733..4a866e5 100644 --- a/src/argaze/utils/tobii_segment_aruco_aoi_export.py +++ b/src/argaze/utils/tobii_segment_aruco_aoi_export.py @@ -330,7 +330,7 @@ def main(): print(f'Markers {marker_id} has been detected in {tracked_count} / {try_count} frames ({round(100 * tracked_count / try_count, 2)} %)') # Export aruco aoi data - ts_offset_aois.export_as_csv(vs_data_filepath) + ts_offset_aois.save_as_csv(vs_data_filepath) print(f'Aruco AOI data saved into {vs_data_filepath}') # Notify when the aruco aoi video has been exported diff --git a/src/argaze/utils/tobii_segment_gaze_movements_export.py b/src/argaze/utils/tobii_segment_gaze_movements_export.py index 36e937f..fdf4a91 100644 --- a/src/argaze/utils/tobii_segment_gaze_movements_export.py +++ b/src/argaze/utils/tobii_segment_gaze_movements_export.py @@ -127,7 +127,7 @@ def main(): if isinstance(item, GazeFeatures.DispersionBasedMovementIdentifier.DispersionBasedFixation): - start_ts, start_position = item.positions.get_first() + start_ts, start_position = item.positions.first fixations[start_ts] = item @@ -137,8 +137,8 @@ def main(): elif isinstance(item, GazeFeatures.DispersionBasedMovementIdentifier.DispersionBasedSaccade): - start_ts, start_position = item.positions.get_first() - end_ts, end_position = item.positions.get_last() + start_ts, start_position = item.positions.first + end_ts, end_position = item.positions.last saccades[start_ts] = item @@ -155,15 +155,15 @@ def main(): print(f'\n{len(fixations)} fixations and {len(saccades)} saccades found') # Export fixations analysis - fixations.export_as_csv(fixations_filepath) + fixations.save_as_csv(fixations_filepath) print(f'Fixations saved into {fixations_filepath}') # Export saccades analysis - saccades.export_as_csv(saccades_filepath) + saccades.save_as_csv(saccades_filepath) print(f'Saccades saved into {saccades_filepath}') # Export gaze status analysis - gaze_status.export_as_csv(gaze_status_filepath) + gaze_status.save_as_csv(gaze_status_filepath) print(f'Gaze status saved into {gaze_status_filepath}') # Prepare video exportation at the same format than segment video |