pyavs.load_and_enrich_eye_events¶
- pyavs.load_and_enrich_eye_events(subjects: List[int], sessions: List[int], data_path: str | None = None, output_prefix: str = 'as', preprocessed: bool = True, fix_multi_saccades: bool = True, verbose: bool = True, include_fixation_zero: bool = False, offset_scene_triggers_ms: int = 20, add_event_sequence_positions: bool = True, add_pupil_dilation: bool = False, **kwargs) Tuple[DataFrame, DataFrame][source]¶
Load and enrich eye tracking events for multiple subjects/sessions.
This function combines fixation events from all subjects into one dataframe and enriches it with: - Trial, block, and scene ID information - Scene vs caption task recording type - Timing information relative to trial onset - Fixation sequence positions
- Parameters:
data_path (str, optional) – Path to data directory. If None, uses configured data path
output_prefix (str, optional) – Output file prefix (default: ‘as’)
preprocessed (bool, optional) – Whether to load preprocessed data (default: True)
fix_multi_saccades (bool, optional) – Whether to fix multi-saccade artifacts (default: True)
verbose (bool, optional) – Whether to print progress information (default: True)
include_fixation_zero (bool, optional) – Whether to include fixations that partially overlap with fixation cross (default: False)
offset_scene_triggers_ms (int, optional) – Offset to fix scene trigger delay in milliseconds (default: 20)
add_pupil_dilation (bool, optional) – Whether to compute and add pa_mean and pa_sd per fixation from cleaned samples (default: False). Requires cleaned_samples file to be present.
- Returns:
(experiment_log_df, events_df) - Combined experiment log and events dataframes
- Return type: