EMtools: eye movement processing programs written in Java

coded by Tom Foulsham, University of Nottingham, 2007.

http://www.psychology.nottingham.ac.uk/staff/lpxtf

README CONTENTS

  1. Introduction
  2. Getting started
  3. Formatting input data
  4. Programs:
  5. References and acknowledgements

INTRODUCTION

EMtools is a collection of simple programs which are designed to make visualising and analysing eye movement data a bit easier. Feedback on these programs is welcome (lpxtf@psychology.nottingham.ac.uk). Although EMtools was written with certain research in mind (eye movements over relatively complex displays on a monitor) wherever possible the programs should be usable for many different paradigms. The programs allow the user to load eye movement event data - specifically the sequence of fixations made, along with their 2D spatial coordinates. Once this data is available EMtools allows fixations and saccades to be plotted (and saved to an image), scanpaths to be compared, and the fixations to be analysed in terms of underlying feature maps or user-defined regions.

GETTING STARTED

Several examples are included in the "my_files" directory of the installation, and the best way to see how the programs work is to try them out:

The other programs can be accessed from the main menu and each is described in more detail below.

FORMATTING INPUT DATA

As the above example shows, EMTools can process eye movement data from plain, tab-delimited text files. In order to keep it as simple as possible, the format of each line of these files has to be as follows:

[SetName (optional) ] [Fixation Index] [x in pixels] [y in pixels]

Check Example1.txt and Example2.txt for examples of this format. Each line refers to a fixation with the coordinates (x,y). The Fixation Index column must be an integer, starting at 1, which shows the series of fixations in one scanpath. X and Y columns can be integers or decimals. As yet these tools do not take into account the duration of fixations, and they assume that saccades travel directly between fixations. Optionally, a set name can be included in the first column. This could refer to the trial or image on which the scanpath was recorded. It should be fairly easy to edit and save data files in this way from raw eyetracker output, using a spreadsheet such as MS Excel. The presence of any other information in the files may lead to an error.

Some of the tools use other input files. Briefly they are: images on which the scanpath can be displayed (most image types, .jpg, .bmp, .gif are ok); ROI (region of interest) text files; and feature maps (which must be ASCII format .pgm or .ppm files). There are examples of each type in the relevant directory (e.g. "my_files/images/"), where you are advised to keep your own files.

SCANPATH BATCH COMPARISON

Clicking the "Batch process scanpaths..." option from the main menu takes you to a tool which allows multiple scanpaths from different files to be compared easily. The output is written to a text file which can then be analysed elsewhere. The two lists at the top of the frame allow data files to be loaded. Just select the file(s) you want to compare to each other, using Ctrl or Option to select multiple files if necessary. Then choose from the different options which determine how the scanpaths are compared. For example if you want to remove the first fixation, and include only the next five, select "Use only fixations from" and change the start and end index to "2" and "6". The "Output" button at the bottom asks the user for an output file name and the comparisons are written to this file. If "Compare sequentially" is selected, the 1st scanpath in file A will be compared to the 1st in file B and so on. If "Match set names" is chosen, only the comparisons between sets with the same label will be made. Remember that only those files highlighted in the list will be processed. Although the tool is designed to work on lists of coordinates, ticking the "Compare strings from file only" option allows the string-edit distance method to be performed on two lists of character strings. Finally, this tool will also allow the user to simulate randomly-generated scanpaths in order to determine how the metrics change with the different parameters. Just choose the required settings and hit "Output simulations".

ROI ANALYSIS

The "Process regions of interest..." tool allows the visual area to be broken down into regions. An ROI file lists the name and four coordinates of one or several quadrilateral regions. An output file can be generated which shows measures for each scanpath and each ROI (and optionally for each fixation). Files are loaded in as previously, and checking the different options determines which measures will be computed. If you have several different ROIs for different trials, you can give them the same name as the set name for that trial, and selecting "Match set to ROI ID" will automatically choose the correct ROI within a file.

PROCESSING FEATURE MAPS

Some users may want to compare the scanpaths plotted with the underlying values in a feature map or fixation map. This is simply a 2D matrix of pixel values corresponding to some measure of intensity. For complex ROIs, it might be desirable to use an image mask to identify fixations. At present, EMTools can read in plain ASCII .pgm files, or simple arrays of integers saved with a .pgm or .ppm extension. Clicking "Output value at fixation" will produce an output file which extracts the value in the map at each fixation location. Alternatively, a list of maps can be selected and statistics produced about each one, or their values can be averaged.

PLOTTING MULTIPLE SCANPATHS

Whilst the scanpath viewer allows one or two scanpaths to be visualised, the multiple plot tool allows many more fixations to be plotted. The controls work in the same way as previously. The "Plot" button will display all eye movements on the canvas, or the sets to display can be filtered with a label from the set name.

REFERENCES AND ACKNOWLEDGEMENTS

The linear distance method for comparing scanpaths is based on Mannan, Ruddock and Wooding (1995). Spatial Vision, 9, 363-386. The UA variant is discussed in Henderson, Brockmole, Castelhano and Mack (2007). In van Gompel et al. (Eds.), Eye movements: A window on mind and brain, 537-562). Some of the code is based on that found at http://www.merriampark.com.

These tools are free for people to use in their research. If you do make use of them, let me know what you think. You might also like to read and cite one of my publications (for example Foulsham and Underwood, 2008, www.journalofvision.org/8/2/6 ).