CHAP: Open-source software for processing and analyzing pupillometry data

  • Ronen HershmanEmail author
  • Avishai Henik
  • Noga Cohen


Pupil dilation is an effective indicator of cognitive and affective processes. Although several eyetracker systems on the market can provide effective solutions for pupil dilation measurement, there is a lack of tools for processing and analyzing the data provided by these systems. For this reason, we developed CHAP: open-source software written in MATLAB. This software provides a user-friendly graphical user interface for processing and analyzing pupillometry data. Our software creates uniform conventions for the preprocessing and analysis of pupillometry data and provides a quick and easy-to-use tool for researchers interested in pupillometry. To download CHAP or join our mailing list, please visit CHAP’s website:


Pupillometry GUI Open-source code Bayesian analysis MATLAB 



  1. Akdoğan, B., Balcı, F., & van Rijn, H. (2016). Temporal expectation indexed by pupillary response. Timing & Time Perception, 4, 354–370. doi:
  2. Barbur, J. L., Harlow, A. J., & Sahraie, A. (2007). Pupillary responses to stimulus structure, colour and movement. Ophthalmic and Physiological Optics, 12, 137–141. doi: CrossRefGoogle Scholar
  3. Beatty, J. (1982). Task-evoked pupillary responses, processing load, and the structure of processing resources. Psychological Bulletin, 91, 276–292. doi: CrossRefGoogle Scholar
  4. Beatty, J., & Kahneman, D. (1966). Pupillary changes in two memory tasks. Psychonomic Science, 5, 371–372. doi: CrossRefGoogle Scholar
  5. Binda, P., & Murray, S. O. (2015). Spatial attention increases the pupillary response to light changes. Journal of Vision, 15(2), 1. doi: CrossRefGoogle Scholar
  6. Binda, P., Pereverzeva, M., & Murray, S. O. (2014). Pupil size reflects the focus of feature-based attention. Journal of Neurophysiology, 112, 3046–3052. doi: CrossRefGoogle Scholar
  7. Binda, P., Straßer, T., Stingl, K., Richter, P., Peters, T., Wilhelm, H., . . . Kelbsch, C. (2017). Pupil response components: attention-light interaction in patients with Parinaud’s syndrome. Scientific Reports, 7, 10283. doi:
  8. Bitsios, P., Szabadi, E., & Bradshaw, C. . (2004). The fear-inhibited light reflex: Importance of the anticipation of an aversive event. International Journal of Psychophysiology, 52, 87–95. doi: CrossRefGoogle Scholar
  9. Blaser, E., Eglington, L., Carter, A. S., & Kaldy, Z. (2014). Pupillometry reveals a mechanism for the autism spectrum disorder (ASD) advantage in visual tasks. doi:
  10. Bradley, M. M., Miccoli, L., Escrig, M. A., & Lang, P. J. (2008). The pupil as a measure of emotional arousal and autonomic activation. Psychophysiology, 45, 602–607. doi: CrossRefGoogle Scholar
  11. Braem, S., Coenen, E., Bombeke, K., van Bochove, M. E., & Notebaert, W. (2015). Open your eyes for prediction errors. Cognitive, Affective, & Behavioral Neuroscience, 15, 374–380. doi: CrossRefGoogle Scholar
  12. Breeden, A. L., Siegle, G. J., Norr, M. E., Gordon, E. M., & Vaidya, C. J. (2017). Coupling between spontaneous pupillary fluctuations and brain activity relates to inattentiveness. European Journal of Neuroscience, 45, 260–266. doi: CrossRefGoogle Scholar
  13. Brisson, J., Mainville, M., Mailloux, D., Beaulieu, C., Serres, J., & Sirois, S. (2013). Pupil diameter measurement errors as a function of gaze direction in corneal reflection eyetrackers. Behavior Research Methods, 45, 1322–1331. doi: CrossRefGoogle Scholar
  14. Cohen, N., Moyal, N., & Henik, A. (2015). Executive control suppresses pupillary responses to aversive stimuli. Biological Psychology, 112, 1–11. doi: CrossRefGoogle Scholar
  15. Dalmaijer, E. S., Mathôt, S., & Van der Stigchel, S. (2014). PyGaze: An open-source, cross-platform toolbox for minimal-effort programming of eyetracking experiments. Behavior Research Methods, 46, 913–921. doi: CrossRefGoogle Scholar
  16. de Gee, J. W., Knapen, T., & Donner, T. H. (2014). Decision-related pupil dilation reflects upcoming choice and individual bias. Proceedings of the National Academy of Sciences, 111, E618–E625. doi: CrossRefGoogle Scholar
  17. Diede, N. T., & Bugg, J. M. (2017). Cognitive effort is modulated outside of the explicit awareness of conflict frequency: Evidence from pupillometry. Journal of Experimental Psychology: Learning, Memory, and Cognition, 43, 824–835. doi: Google Scholar
  18. Einhäuser, W., Koch, C., & Carter, O. L. (2010). Pupil dilation betrays the timing of decisions. Frontiers in Human Neuroscience, 4, 18. doi: Google Scholar
  19. Einhäuser, W., Stout, J., Koch, C., & Carter, O. (2008). Pupil dilation reflects perceptual selection and predicts subsequent stability in perceptual rivalry. Proceedings of the National Academy of Sciences, 105, 1704–1709. doi: CrossRefGoogle Scholar
  20. Feigl, B., Zele, A. J., Fader, S. M., Howes, A. N., Hughes, C. E., Jones, K. A., & Jones, R. (2012). The post-illumination pupil response of melanopsin-expressing intrinsically photosensitive retinal ganglion cells in diabetes. Acta Ophthalmologica, 90, e230–e234. doi: CrossRefGoogle Scholar
  21. Gagl, B., Hawelka, S., & Hutzler, F. (2011). Systematic influence of gaze position on pupil size measurement: Analysis and correction. Behavior Research Methods, 43, 1171–1181. doi: CrossRefGoogle Scholar
  22. Geva, R., Zivan, M., Warsha, A., & Olchik, D. (2013). Alerting, orienting or executive attention networks: Differential patters of pupil dilations. Frontiers in Behavioral Neuroscience, 7, 145. doi: CrossRefGoogle Scholar
  23. Goldinger, S. D., & Papesh, M. H. (2012). Pupil dilation reflects the creation and retrieval of memories. Current Directions in Psychological Science, 21, 90–95. doi: CrossRefGoogle Scholar
  24. Graham, F. K. (1975). Presidential Address, 1974: The more or less startling effects of weak prestimulation. Psychophysiology, 12, 238–348. Retrieved from CrossRefGoogle Scholar
  25. Hemmati, M. (2017). A study on the visual illusion effects on the pupillary aperture (Doctoral dissertation). Retrieved from
  26. Henderson, R. R., Bradley, M. M., & Lang, P. J. (2014). Modulation of the initial light reflex during affective picture viewing. Psychophysiology, 51, 815–818. doi: CrossRefGoogle Scholar
  27. Hershman, R., Henik, A., & Cohen, N. (2018). A novel blink detection method based on pupillometry noise. Behavior Research Methods, 50: 107. doi: CrossRefGoogle Scholar
  28. Hershman, R., & Henik, A. (2019). Dissociation between reaction time and pupil dilation in the Stroop task. Journal of Experimental Psychology: Learning, Memory, and Cognition.
  29. Hess, E. H., & Polt, J. M. (1960). Pupil size as related to interest value of visual stimuli. Science, 132, 349–350. doi: CrossRefGoogle Scholar
  30. Hess, E. H., & Polt, J. M. (1964). Pupil size in relation to mental activity during simple problem-solving. Science, 143, 1190–1192. doi: CrossRefGoogle Scholar
  31. Jeffreys, H. (1961). Theory of probability (3rd ed.). Oxford, UK: Oxford University Press, Clarendon Press.Google Scholar
  32. Jongkees, B. J., & Colzato, L. S. (2016). Spontaneous eye blink rate as predictor of dopamine-related cognitive function—A review. Neuroscience & Biobehavioral Reviews, 71, 58–82. doi: CrossRefGoogle Scholar
  33. Kahneman, D., & Beatty, J. (1966). Pupil diameter and load on memory. Science, 154, 1583–1585. doi: CrossRefGoogle Scholar
  34. Kang, O., & Wheatley, T. (2015). Pupil dilation patterns reflect the contents of consciousness. Consciousness and Cognition, 35, 128–135. doi: CrossRefGoogle Scholar
  35. Karson, C. N. (1983). Spontaneous eye-blink rates and dopaminergic systems. Brain, 106, 643–653. doi: CrossRefGoogle Scholar
  36. Kass, R. E., & Raftery, A. E. (1995). Bayes Factors. Journal of the American Statistical Association, 90, 773–795. doi: CrossRefGoogle Scholar
  37. Klingner, J., Tversky, B., & Hanrahan, P. (2011). Effects of visual and verbal presentation on cognitive load in vigilance, memory, and arithmetic tasks. Psychophysiology, 48, 323–332. doi: CrossRefGoogle Scholar
  38. Kloosterman, N. A., Meindertsma, T., van Loon, A. M., Lamme, V. A. F., Bonneh, Y. S., & Donner, T. H. (2015). Pupil size tracks perceptual content and surprise. European Journal of Neuroscience, 41, 1068–1078. doi: CrossRefGoogle Scholar
  39. Koelewijn, T., de Kluiver, H., Shinn-Cunningham, B. G., Zekveld, A. A., & Kramer, S. E. (2015). The pupil response reveals increased listening effort when it is difficult to focus attention. Hearing Research, 323, 81–90. doi: CrossRefGoogle Scholar
  40. Kostic, C., Crippa, S. V., Martin, C., Kardon, R. H., Biel, M., Arsenijevic, Y., & Kawasaki, A. (2016). Determination of rod and cone influence to the early and late dynamic of the pupillary light response. Investigative Opthalmology and Visual Science, 57, 2501–2508. doi: CrossRefGoogle Scholar
  41. Kret, M. E., & Sjak-Shie, E. E. (2018). Preprocessing pupil size data: Guidelines and code. Behavior Research Methods, 1–7. doi:
  42. Kuchinke, L., Võ, M. L.-H., Hofmann, M., & Jacobs, A. M. (2007). Pupillary responses during lexical decisions vary with word frequency but not emotional valence. International Journal of Psychophysiology, 65, 132–140. doi: CrossRefGoogle Scholar
  43. Laeng, B., Ørbo, M., Holmlund, T., & Miozzo, M. (2011). Pupillary Stroop effects. Cognitive Processing, 12, 13–21. doi: CrossRefGoogle Scholar
  44. Lanting, P., Strijers, R. L. M., Bos, J. E., Faes, T. J. C., & Heimans, J. J. (1991). The cause of increased pupillary light reflex latencies in diabetic patients: the relationship between pupillary light reflex and visual evoked potential latencies. Electroencephalography and Clinical Neurophysiology, 78, 111–115. doi: CrossRefGoogle Scholar
  45. Li, C. (2017). Extracting and visualizing data from mobile and static eye trackers in R and Matlab (Doctoral dissertation). Retrieved from
  46. Mathôt, S. (2013). A simple way to reconstruct pupil size during eye blinks (Unpublished manuscript). Retrieved from doi:
  47. Mathôt, S. (2018). Pupillometry: Psychology, physiology, and function. Journal of Cognition, 1, 16. doi: CrossRefGoogle Scholar
  48. Mathôt, S., Fabius, J., Van Heusden, E., & Van der Stigchel, S. (2018). Safe and sensible preprocessing and baseline correction of pupil-size data. Behavior Research Methods, 50, 94–106. doi: CrossRefGoogle Scholar
  49. Mathôt, S., van der Linden, L., Grainger, J., & Vitu, F. (2013). The pupillary light response reveals the focus of covert visual attention. PLoS ONE, 8, e78168. doi: CrossRefGoogle Scholar
  50. McDougal, D. H., & Gamlin, P. D. (2010). The influence of intrinsically-photosensitive retinal ganglion cells on the spectral sensitivity and response dynamics of the human pupillary light reflex. Vision Research, 50, 72–87. doi: CrossRefGoogle Scholar
  51. Monster, A. W., Chan, H. C., & O’Connor, D. (1978). Long-term trends in human eye blink rate. Biotelemetry and Patient Monitoring, 5, 206–222. Retrieved from Google Scholar
  52. Murphy, P. R., O’Connell, R. G., O’Sullivan, M., Robertson, I. H., & Balsters, J. H. (2014a). Pupil diameter covaries with BOLD activity in human locus coeruleus. Human Brain Mapping, 35, 4140–4154. doi: CrossRefGoogle Scholar
  53. Murphy, P. R., Vandekerckhove, J., & Nieuwenhuis, S. (2014b). Pupil-linked arousal determines variability in perceptual decision making. PLoS Computational Biology, 10, e1003854. doi: CrossRefGoogle Scholar
  54. Naber, M., & Nakayama, K. (2013). Pupil responses to high-level image content. Journal of Vision, 13(6), 7. doi:
  55. Nyström, M., Andersson, R., Holmqvist, K., & van de Weijer, J. (2013). The influence of calibration method and eye physiology on eyetracking data quality. Behavior Research Methods, 45, 272–288. doi: CrossRefGoogle Scholar
  56. Otero, S. C., Weekes, B. S., & Hutton, S. B. (2011). Pupil size changes during recognition memory. Psychophysiology, 48, 1346–1353. doi: CrossRefGoogle Scholar
  57. Partala, T., & Surakka, V. (2003). Pupil size variation as an indication of affective processing. International Journal of Human–Computer Studies, 59, 185–198. doi: CrossRefGoogle Scholar
  58. Peirce, J. W. (2007). PsychoPy—Psychophysics software in Python. Journal of Neuroscience Methods, 162, 8–13. doi: CrossRefGoogle Scholar
  59. Phillips, M. A., Szabadi, E., & Bradshaw, C. M. (2001). Comparison of the effects of clonidine and yohimbine on pupillary diameter at different illumination levels. British Journal of Clinical Pharmacology, 50, 65–68. doi: CrossRefGoogle Scholar
  60. Preuschoff, K., ‘t Hart, B. M., & Einhäuser, W. (2011). Pupil dilation signals surprise: Evidence for noradrenaline’s role in decision making. Frontiers in Neuroscience, 5, 115. doi:
  61. Rouder, J. N., Morey, R. D., Speckman, P. L., & Province, J. M. (2012). Default Bayes factors for ANOVA designs. Journal of Mathematical Psychology, 56, 356–374. doi: CrossRefGoogle Scholar
  62. Schmidtke, J. (2014). Second language experience modulates word retrieval effort in bilinguals: Evidence from pupillometry. Frontiers in Psychology, 5, 137. doi: Google Scholar
  63. Shah, S. S., Kurup, S. P., Ralay Ranaivo, H., Mets-Halgrimson, R. B., & Mets, M. B. (2018). Ophthalmic genetics pupillary manifestations of Marfan syndrome: From the Marfan eye consortium of Chicago. Ophthalmic Genetics, 39, 297–299. doi: CrossRefGoogle Scholar
  64. Siegle, G. J., Steinhauer, S. R., Carter, C. S., Ramel, W., & Thase, M. E. (2003). Do the seconds turn into hours? Relationships between sustained pupil dilation in response to emotional information and self-reported rumination. Cognitive Therapy and Research, 27, 365–382. doi: CrossRefGoogle Scholar
  65. Siegle, G. J., Steinhauer, S. R., & Thase, M. E. (2004). Pupillary assessment and computational modeling of the Stroop task in depression. International Journal of Psychophysiology, 52, 63–76. doi: CrossRefGoogle Scholar
  66. Smallwood, J., Brown, K. S., Tipper, C., Giesbrecht, B., Franklin, M. S., Mrazek, M. D., . . . Schooler, J. W. (2011). Pupillometric evidence for the decoupling of attention from perceptual input during offline thought. PLoS ONE, 6, e18298. doi:
  67. Snell, J., Mathôt, S., Mirault, J., & Grainger, J. (2018). Parallel graded attention in reading: A pupillometric study. Scientific Reports, 8, 3743. doi: CrossRefGoogle Scholar
  68. Sogo, H. (2013). GazeParser: An open-source and multiplatform library for low-cost eye tracking and analysis. Behavior Research Methods, 45, 684–695. doi: CrossRefGoogle Scholar
  69. Steinhauer, S. R., Condray, R., & Kasparek, A. (2000). Cognitive modulation of midbrain function: Task-induced reduction of the pupillary light reflex. International Journal of Psychophysiology, 39, 21–30. doi: CrossRefGoogle Scholar
  70. Steinhauer, S. R., Siegle, G. J., Condray, R., & Pless, M. (2004). Sympathetic and parasympathetic innervation of pupillary dilation during sustained processing. International Journal of Psychophysiology, 52, 77–86. doi: CrossRefGoogle Scholar
  71. Titz, J., Scholz, A., & Sedlmeier, P. (2018). Comparing eye trackers by correlating their eye-metric data. Behavior Research Methods, 50, 1853–1863. doi: CrossRefGoogle Scholar
  72. Turi, M., Burr, D. C., & Binda, P. (2018). Pupillometry reveals perceptual differences that are tightly linked to autistic traits in typical adults. eLife, 7, 32399. doi: CrossRefGoogle Scholar
  73. Unsworth, N., & Robison, M. K. (2017). The importance of arousal for variation in working memory capacity and attention control: A latent variable pupillometry study. Journal of Experimental Psychology: Learning, Memory, and Cognition, 43, 1962–1987. doi: Google Scholar
  74. van der Wel, P., & van Steenbergen, H. (2018). Pupil dilation as an index of effort in cognitive control tasks: A review. Psychonomic Bulletin & Review, 25, 2005–2015. doi: CrossRefGoogle Scholar
  75. van Steenbergen, H., & Band, G. P. H. (2013). Pupil dilation in the Simon task as a marker of conflict processing. Frontiers in Human Neuroscience, 7, 215. doi: Google Scholar
  76. van Steenbergen, H., Band, G. P. H., & Hommel, B. (2011). Threat but not arousal narrows attention: Evidence from pupil dilation and saccade control. Frontiers in Psychology, 2, 281. doi: Google Scholar
  77. Wainstein, G., Rojas-Líbano, D., Crossley, N. A., Carrasco, X., Aboitiz, F., & Ossandón, T. (2017). Pupil size tracks attentional performance in attention-deficit/hyperactivity disorder. Scientific Reports, 7, 8228. doi: CrossRefGoogle Scholar
  78. Wang, C.-A., Brien, D. C., & Munoz, D. P. (2015). Pupil size reveals preparatory processes in the generation of pro-saccades and anti-saccades. European Journal of Neuroscience, 41, 1102–1110. doi: CrossRefGoogle Scholar
  79. Wang, C.-A., McInnis, H., Brien, D. C., Pari, G., & Munoz, D. P. (2016). Disruption of pupil size modulation correlates with voluntary motor preparation deficits in Parkinson’s disease. Neuropsychologia, 80, 176–184. doi: CrossRefGoogle Scholar
  80. Wilhelm, B. J., Wilhelm, H., Moro, S., & Barbur, J. L. (2002). Pupil response components: Studies in patients with Parinaud’s syndrome. Brain, 125, 2296–2307.CrossRefGoogle Scholar
  81. Yellin, D., Berkovich-Ohana, A., & Malach, R. (2015). Coupling between pupil fluctuations and resting-state fMRI uncovers a slow build-up of antagonistic responses in the human cortex. NeuroImage, 106, 414–427. doi: CrossRefGoogle Scholar
  82. Zhegallo, A. V., & Marmalyuk, P. A. (2015). ETRAN—R extension package for eye tracking results analysis. Perception, 44, 1129–1135. doi: CrossRefGoogle Scholar

Copyright information

© The Psychonomic Society, Inc. 2019

Authors and Affiliations

  1. 1.Department of Cognitive and Brain SciencesBen-Gurion University of the NegevBeer-ShevaIsrael
  2. 2.Zlotowski Center for NeuroscienceBen-Gurion University of the NegevBeer-ShevaIsrael
  3. 3.Department of PsychologyBen-Gurion University of the NegevBeer-ShevaIsrael
  4. 4.Department of Special EducationUniversity of HaifaHaifaIsrael
  5. 5.The Edmond J. Safra Brain Research Center for the Study of Learning DisabilitiesUniversity of HaifaHaifaIsrael

Personalised recommendations