These scripts reproduce the analyses in the paper:
Olmos-Solis, van Loon & Olivers (submitted): Pupil dilation reflects task relevance prior to search.
Some of the scripts and other linked functions are taken - and modified when needed - from the publicly available code by Urai AE, Braun A, Donner THD (2016): Pupil-linked arousal is driven by decision uncertainty and alters serial choice bias. When using this analysis pipeline also refer to that paper.
**Included files**
Code --> the main analysis scripts
Process --> preprocessed data
Raw--> .edf, .csv files
Task_SPSS --> Experiment files and SPSS file for RTs and accuracy analysis/
**Running the experiment**
Data from the experiments were collected with Opensesame, a Python-based experiment builder (v2.9) in combination with Eyelink. OpenSesame Eyelink plug-ins are deprecated in favor of PyGaze. However, you could download them here:
http://osdoc.cogsci.nl/2.8/devices/eyelink/
Nevertheless, if you want to run a similar experiment, I would recommend to swich to PyGaze instead.
**Data analysis**
To replicate the full analyses, download and unzip the raw data and the code. Follow the steps in a0_reproduceAnalyses.m. Change Data and Code path to match the location where you placed them in your own computer.
If you want to skip preprocessing, you can download and unzip the preprocessed data in the folder 'Process'.
You will need to download the fieldtrip Toolbox to perform the analyses: http://www.fieldtriptoolbox.org/download
When working with the raw data, edf files (binary) have to be converted to asc files (plain text) using edf2asc.
If some functions from preprocessing are missing, you will certainly find them in the original repository of Anne Urai: https://github.com/anne-urai/Tools
If you have questions or suggestions, feel free to contact me via e-mail: katya.olmos@gmail.com