pyavs.add_sample_scene_coordinates¶
- pyavs.add_sample_scene_coordinates(samples)[source]¶
Add scene-centred and normalised gaze coordinates to raw samples.
- Converts raw screen-pixel coordinates (origin top-left, y-down) to:
gx_scene / gy_scene : scene-centred pixels (+right / +up)
gx_scene_norm / gy_scene_norm : normalised so ±1 = scene edge
Operates on sample-level columns ‘gx’ / ‘gy’ (cf. add_scene_coordinates() which uses ‘mean_gx’ / ‘mean_gy’ for fixation events).
- Parameters:
samples (pd.DataFrame) – Gaze samples (must contain ‘gx’ and ‘gy’ columns).
- Returns:
Same DataFrame with four additional columns.
- Return type:
pd.DataFrame