MoTR-Loco

Mouse Tracking for Reading (MoTR)

This repository contains a lightweight version of “Mouse Tracking for Reading (MoTR)”. There are three experiments:

  1. A demo experiment of naturalistic reading using Provo corpus (Luke & Christianson, 2018). It is in the folder multilingual_motr/demo-provo.
  1. An word masking experiment to study the information distribution in English (Ding et al., 2025) (https://arxiv.org/pdf/2509.17047) . It is in the folder multilingual_motr/en.
  2. An word masking experiment to study the information distribution in Chinese (Ding et al., 2025) (https://arxiv.org/pdf/2509.17047). It is in the folder multilingual_motr/zh.

Demo

Provo demo experiment: link. Chinese word masking experiment: link. English word masking experiment: link.

Running MoTR in Magpie

Contents

Workflow for Running a Basic MoTR Trial

The following workflow should enable you to run a MoTR experiment, locally, in your browser.

For more information about how to deploy Magpie experiments onto the web, and run them with human participants, please see the Magpie documentation. A simple workflow is in folder resources/Workflow-MoTR-with-notes.pdf.

Post Processing

Please note that you need to adapt this pipeline to your own experiment.

Contents

Running the Post Processing Pipeline

 python3 postprocessing.py --in_file local_coherence_reading_data.csv --trial_file trials/localCoherence.tsv

This call takes a raw MoTR data file called local_coherence_reading_data.csv and the trial item data localCoherence.tsv in the folder trials, output the divided raw data files, files for fixation sequences, files for reading measures and processed trial data file into ./divided,./fixations, ./reading_measures, ./processed_trial, respectively.

 python3 postprocessing.py --in_file local_coherence_reading_data.csv --processed_trial_file trials/localCoherence_sent_region.csv

This call takes a raw MoTR data file called local_coherence_reading_data.csv and the already processed trial data localCoherence_sent_region.csv in the folder trials, output the divided raw data files, files for fixation sequences, files for reading measures into ./divided,./fixations, ./reading_measures, respectively.

python3 postprocessing.py --in_folder data --processed_trial_file trials/localCoherence_sent_region.csv

This call takes a folder which can contain multiple raw MoTR data files called data and the already processed trial data localCoherence_sent_region.csv in the folder trials, output the divided raw data files, files for fixation sequences, files for reading measures into ./divided,./fixations, ./reading_measures, respectively.

python3 postprocessing.py --in_file provo_reading_data.csv --trial_file trials/provo_items.tsv --divided_dir divide_by_reader --processed_trial_dir ../stimuli --fixation_dir fixations --rt_dir reading_metrics --low_thres 200 --up_thres 3000

This call takes a raw MoTR data file called provo_reading_data.csv and the trial item data provo_items.tsv in the folder trials, output the divided raw data files, files for fixation sequences, files for reading measures and processed trial data file into ./divide_by_reader,./fixations, ./reading_metrics, ../stimuli, respectively. It will extract fixations ranging from 200 ms to 3000 ms.

python3 postprocessing.py --in_folder data2 --trial_file trials/provo_items.tsv --divided_dir divide_by_reader --fixation_dir fixations --rt_dir reading_metrics --low_thres 200 --up_thres 3000

This call takes a folder which can contain multiple raw MoTR data files called data2 and the trial data file provo_items.tsv in the folder trials, output the divided raw data files, files for fixation sequences, files for reading measures into ./divide_by_reader,./fixations, ./reading_metrics, ../stimuli, respectively. It will extract fixations ranging from 200 ms to 3000 ms.