pyavs.run_ica_et_pipeline

pyavs.run_ica_et_pipeline(subject_id: int, session: int, data_path: str | None = None, top_fraction: float = 0.05, filter_l_freq: float = 1.0, filter_h_freq: float = 40.0, n_components: int | None = None, reject: dict | None = None, save_results: bool = True, verbose: bool = True) Tuple[mne.preprocessing.ICA, List[int], List[int], DataFrame][source]

Full ICA pipeline with eye tracking XY correlation for one subject/session.

Loads preprocessed MEG blocks, aligns ET samples to MEG per scene trial (60 ms offset, no realign_raw), fits ICA on a filtered copy of the concatenated session, then flags ICs correlated with per-scene gaze.

Parameters:
  • subject_id (int) – Subject ID.

  • session (int) – Session number.

  • data_path (str, optional) – Path to data directory. If None, uses configured data path.

  • top_fraction (float, optional) – Fraction of components to flag as eye-related by max_r rank (default: 0.05).

  • filter_l_freq (float, optional) – High-pass cutoff for ICA fitting copy (default: 1.0 Hz).

  • filter_h_freq (float, optional) – Low-pass cutoff for ICA fitting copy (default: 40.0 Hz).

  • n_components (int, optional) – Number of ICA components (default: None, uses all available).

  • save_results (bool, optional) – Whether to save ICA solution and ET scores to derivatives (default: True).

  • verbose (bool, optional) – Whether to log progress (default: True).

Returns:

(ica, eye_exclusions, cardiac_exclusions, scores_df)

Return type:

tuple