API Reference

This page indexes the full pyavs top-level API (everything importable as pyavs.<name>). For richer, docstring-heavy documentation organized by topic, see the per-submodule pages below. AVSComposer, EyeTrackingPlotter, AVSRemote and open_remote are documented in full on their dedicated pages (Preprocessing (pyavs.preprocessing), Visualization (pyavs.visualization), Remote Access (pyavs.remote)) rather than duplicated below.

Top-Level API

pyavs.set_data_path

pyavs.get_data_path

pyavs.setup_data_directory

pyavs.configure

Configure pyavs data directory once per machine/environment.

pyavs.check_data_availability

Check if data is available for a subject/session.

pyavs.load_eye_events

Load eye tracking events and messages for a subject/session.

pyavs.load_experiment_log

Load experiment log for a subject/session.

pyavs.load_anatomical

Load anatomical data path for a subject.

pyavs.load_scenes

Load scene image paths, fetching from COCO on demand if not shipped locally.

pyavs.load_and_enrich_eye_events

Load and enrich eye tracking events for multiple subjects/sessions.

pyavs.add_fixation_sequence_position

Add fixation sequence positions to events dataframe.

pyavs.add_cross_event_information

Add cross-event information (saccade-fixation relationships).

pyavs.load_and_preprocess_eye_tracking

Load and preprocess eye-tracking data for multiple subjects/sessions.

pyavs.load_meg_raw

Load raw MEG data for a specific subject/session/run.

pyavs.load_meg_preprocessed

Load preprocessed MEG data for a specific subject/session/run.

pyavs.load_meg_session

Load MEG data for all runs in a session.

pyavs.load_and_preprocess_meg_run

Load and preprocess MEG data for a single run.

pyavs.get_fixated_objects

Add object labels to fixation events using transformed AVS scene annotations.

pyavs.preprocess_eye_events

Preprocess eye tracking events by removing artifacts and outliers.

pyavs.apply_maxwell_filter

Apply Maxwell filtering (tSSS) to MEG data.

pyavs.filter_meg

Apply bandpass filtering to MEG data.

pyavs.resample_meg

Resample MEG data to a new sampling frequency.

pyavs.preprocess_meg_block

Complete preprocessing pipeline for a single MEG block.

pyavs.apply_precomputed_ica

Apply precomputed ICA solution to MEG data.

pyavs.compute_ica

Compute ICA decomposition on MEG data.

pyavs.apply_ica

Apply ICA to remove specified components.

pyavs.find_cardiac_components

Find ICA components related to cardiac artifacts.

pyavs.find_eye_components_xy_correlation

Find ICA components correlated with per-scene XY gaze position.

pyavs.run_ica_et_pipeline

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

pyavs.build_et_raw_from_samples

Wrap eye tracking samples from a CSV DataFrame into an MNE RawArray.

pyavs.align_et_to_meg

Align ET RawArray to MEG Raw using shared scene onset events.

pyavs.create_et_event_epochs

Create MEG epochs based on eye tracking events using the AVS composer approach.

pyavs.get_meg_trigger_mapping

Get mapping of MEG trigger names to codes.

pyavs.repair_meg_trigger_events

Repair corrupted MEG trigger events.

pyavs.get_meg_trigger_dict

Here we define a dictionary to map the event codes to the event names.

pyavs.get_avs_blocks

Returns a list of all avs blocks in the requested session.

pyavs.get_meg_timestamp

Returns the timestamp of the scene onset in the MEG data.

pyavs.add_fix_event_trigger

Adds eye movement based event triggers (fixation, saccade) to the raw neuro data.

pyavs.attach_scene_ids_to_samples

Attach scene IDs and trial information to eye tracking samples using pyAVS conventions.

pyavs.load_samples_with_scenes

Convenience function to load samples file and attach scene information.

pyavs.validate_samples_scene_assignment

Validate the scene ID assignment results for samples.

pyavs.create_forward_model

Create forward model for source reconstruction.

pyavs.create_bem_model

Create BEM (Boundary Element Method) model for source reconstruction.

pyavs.setup_coregistration

Set up coregistration between MEG and MRI coordinate systems.

pyavs.load_forward_model

Load a forward model from the dataset.

pyavs.apply_source_reconstruction

Apply source reconstruction to epoched data.

pyavs.compute_beamformer_filters

Compute LCMV beamformer filters.

pyavs.compute_population_codes

Compute population codes for different experimental conditions.

pyavs.extract_roi_data

Extract data from regions of interest.

pyavs.save_source_data

Save source space data in HDF5 format.

pyavs.save_annotated_raw

Save annotated Raw data in HDF5 format.

pyavs.save_population_codes_h5

Save population codes to HDF5 file in standardized format.

pyavs.find_population_codes_files

Find population codes files for a subject with optional parameter filtering.

pyavs.list_available_parameter_sets

List all available parameter sets in the population codes storage.

pyavs.load_source_data

Load data from HDF5 files.

pyavs.create_source_space

Create cortical source space.

pyavs.get_roi_labels

Get ROI labels from FreeSurfer parcellation.

pyavs.get_glasser_roi_labels

Get Glasser atlas ROI names.

pyavs.plot_evoked_joint

Create a joint plot of evoked MEG data: topomaps above, butterfly + GFP below.

pyavs.plot_median_erf

Plot median ERF (Event-Related Field) for MEG sensor space data.

pyavs.plot_sensor_space_overview

Create an overview plot of sensor space MEG data.

pyavs.load_pilot_events

Combine fixation events from all pilot subjects into one enriched DataFrame.

pyavs.load_pilot_samples

Combine enriched gaze samples from all pilot subjects into one DataFrame.

pyavs.add_sample_scene_coordinates

Add scene-centred and normalised gaze coordinates to raw samples.

pyavs.load_and_preprocess

Load and preprocess MEG + eye-tracking data for a subject/session.

pyavs.get_epochs

Extract epochs from preprocessed subject data.

Browse by Topic

AVSComposer (pyavs.preprocessing.composer.AVSComposer, documented in full on Preprocessing (pyavs.preprocessing)) is the recommended high-level entry point for most analyses; see AVSComposer Guide for a guided walkthrough. pyavs.MEGETComposer is a backward-compatibility alias for the same class.

AVSRemote (pyavs.remote.client.AVSRemote, opened via pyavs.open_remote(), documented in full on Remote Access (pyavs.remote)) loads data on demand from the public AWS release bucket instead of a local data_path – see Data Access for details.