This repository contains the analysis code and result visualization code for two visuomotor rotation experiments investigating the effect of manipulations of visuomotor adaptation on eye movements (2-target and 8-target). The code is organized into four main Jupyter notebooks, each serving a specific purpose in the analysis pipeline.
To ensure compatibility and reproducibility, the required environment is provided in pymc5_env.yml. This file specifies all necessary dependencies, including libraries for Bayesian modeling, data processing, and visualization.
This script is responsible for the data preprocessing phase. Here, we import hand movement data collected from PsychoPy and raw eye-tracking data to pre-process them to generate the key metrics necessary for further analysis.
- Input: Raw hand data from PsychoPy (change the path ) and eye-tracker files (change the path ).
- Output: A data table containing computed hand angles, eye angles, reaction times, etc.
- The preprocessed tables are saved as .csv files and are subsequently imported by the Bayesian statistics notebooks.
This notebook performs Bayesian modeling on the 2-target experiment data. The table generated in EyeHand_preprocess.ipynb is loaded to fit a Bayesian model, capturing both the individual and group-level patterns of hand movements, eye movements, and reaction times.
- Key Outputs: Posterior distributions of model parameters, summaries of model fit results, and credible intervals.
Similar to the 2-target notebook, this notebook performs Bayesian analysis on the 8-target experiment data.
This notebook visualizes the core results of the study.
- Run the Preprocessing Script: Start with EyeHand_preprocess.ipynb to generate the preprocessed data tables.
- Run Bayesian Analysis: Open and run BayesianStatistics-2target.ipynb and BayesianStatistics-8target.ipynb sequentially.
- Generate Figures: Finally, execute Plot_figure_final.ipynb to create the visualizations for the paper.