How annavanharmelen/microsaccade-bias-shift-vs-maintain-analysis works
Purpose and execution model
MATLAB analysis repository for a microsaccade-bias experiment. It processes behavioral and eye-tracking recordings produced by the separate Python experiment repository. There is no single application entry point; analysts run MATLAB scripts in a prescribed sequence and edit participant/data-location mapping as needed.
Subject and data-location boundary
getSubjParam.m is the central subject/session configuration boundary: it maps randomized participant/session identifiers to the repository owner’s data organization. Analysis scripts depend on this mapping rather than defining an independent data-ingestion layer.
Relevant paths:
• getSubjParam.m
• setBehaviourParam.m
• getBehaviour.m
Behavioral analysis pipeline
getBehaviour.m is the main behavioral-analysis entry point. It uses behavioral parameter setup and produces statistics/visualization through supporting scripts, separating behavioral results from the eye-tracking pipeline.
Relevant paths:
• getBehaviour.m
• setBehaviourParam.m
• behaviour_stats.m
Eye-data epoching stage
epochEyeData.m is the first required eye-tracking stage. It converts/segments raw eye-tracking data into analysis epochs that downstream gaze-position and saccade computations consume. This is the principal transition from acquired recordings to trial/epoch-level analysis data.
Relevant paths:
• epochEyeData.m
• frevede_nanBlinks_1eye.m
• frevede_pixel2dva.m
Participant-level gaze-position bias
get_GazePositionBias.m computes average gaze bias for each participant after epoching. Supporting transforms convert gaze position into one- or two-dimensional shift/bias representations and provide eye-data summaries.
Relevant paths:
• get_GazePositionBias.m
• PBlab_gazepos2shift_1D.m
• PBlab_gazepos2shift_2D.m
Participant-level saccade bias
get_SaccadeBias.m derives per-participant saccade bias from the epoched eye data. It is parallel to gaze-position analysis but represents a distinct metric and output stream.
Relevant paths:
• get_SaccadeBias.m
• Eye_stats.m
• frevede_allbyall_correlations_new.m
Group-level aggregation and inference
Grand-average scripts consume participant-level bias outputs. Their stated design weights every participant equally rather than weighting by completed trial count. Statistical support includes correlation and 1-D cluster-statistics utilities, with plotting helpers for group-result presentation.
Relevant paths:
• GA_GazePositionBias.m
• GA_SaccadeBias.m
• frevede_ftclusterstat1D.m
Runtime and external dependencies
The runtime is MATLAB. Several eye-tracking and statistical stages depend on the FieldTrip MATLAB toolbox, originally developed against FieldTrip version 2020.10.23; FieldTrip likely provides core statistical/data-structure functionality for functions such as frevede_ftclusterstat1D.m. Input data and experimental semantics originate from the external Microsaccade-bias Python experiment repository.
Relevant paths:
• frevede_ftclusterstat1D.m
• frevede_errorbarplot.m
• create_colour_map.m
Main entry points: epochEyeData.m Eye-data epoching · getBehaviour.m Behavior analysis · getSubjParam.m Subject/session mapping · frevede_ftclusterstat1D.m 1-D cluster inference
Components 18
Runtime & Inputs
- MATLAB · Analysts run scripts in sequence.
- Python experiment repository · Produces behavioral and eye-tracking recordings.
- FieldTrip toolbox · Provides eye-data and statistical functionality.
- Subject/session mapping · Maps randomized identifiers to local data organization.
getSubjParam.m
Behavioral Analysis
- Behavior parameters
setBehaviourParam.m - Behavior analysis
getBehaviour.m - Behavior statistics
behaviour_stats.m
Eye-Tracking Pipeline
- Eye-data epoching · Converts recordings into trial-level analysis epochs.
epochEyeData.m - Blink cleanup
frevede_nanBlinks_1eye.m - Pixel-to-DVA conversion
frevede_pixel2dva.m - Participant gaze bias
get_GazePositionBias.m - Gaze shift transforms · Creates 1-D and 2-D gaze-shift representations.
PBlab_gazepos2shift_1D.m - Participant saccade bias
get_SaccadeBias.m - Eye-data summaries
Eye_stats.m
Group Inference
- Grand-average gaze bias · Weights participants equally.
GA_GazePositionBias.m - Grand-average saccade bias · Weights participants equally.
GA_SaccadeBias.m - 1-D cluster inference
frevede_ftclusterstat1D.m - Group result plots
frevede_errorbarplot.m
Connections 22
- Python experiment repository → Subject/session mapping: recordings mapped by
- MATLAB → Behavior analysis: runs
- MATLAB → Eye-data epoching: runs
- Subject/session mapping → Behavior analysis: data locations
- Behavior parameters → Behavior analysis: parameters
- Behavior analysis → Behavior statistics: behavioral results
- Subject/session mapping → Eye-data epoching: data locations
- Python experiment repository → Eye-data epoching: raw eye recordings
- Blink cleanup → Eye-data epoching: cleaning
- Pixel-to-DVA conversion → Eye-data epoching: coordinate conversion
- FieldTrip toolbox → Eye-data epoching: eye-data support
- Eye-data epoching → Participant gaze bias: analysis epochs
- Gaze shift transforms → Participant gaze bias: shift representations
- Eye-data epoching → Participant saccade bias: analysis epochs
- Eye-data summaries → Participant saccade bias: summaries
- Participant gaze bias → Grand-average gaze bias: participant outputs
- Participant saccade bias → Grand-average saccade bias: participant outputs
- 1-D cluster inference → Grand-average gaze bias: inference
- 1-D cluster inference → Grand-average saccade bias: inference
- FieldTrip toolbox → 1-D cluster inference: statistical support
- Grand-average gaze bias → Group result plots: group results
- Grand-average saccade bias → Group result plots: group results