User manual

110 Data Files
© 2005-2008 SR Research Ltd.
4.10 Processing ASC Files
An ASC file is a simple text file, and thus can be accessed by almost any
programming language. The usual way to process the file is to read each line
into a text buffer (at least 250 characters in size), and to scan the line as a
series of tokens (non-space character groups).
The first token in each line identifies what the line is:
First character in first token Line type
<no token> Blank line--skip
# or ; or / Comment line--skip
* Preamble line--skip
Digit (0..9) Sample line
Letter (A..Z) Event or Specification line
Once the line is identified, it may be processed. Some lines may simply be
skipped, and the next line read immediately. For sample lines, the tokens in the
line can be read and converted into numerical values. The token "." represents a
missing value, and may require special processing. For lines where the first
token begins with a letter, processing depends on what the first token is. The
tokens after the first are read and desired data from the line are extracted from
them. Lines with unrecognized first tokens or with unwanted information can
simply be skipped.
Processing of events and samples will depend on what type of analysis is to be
performed. For many cognitive eye movement analyses, MSG line text specifying
experimental conditions, EFIX event data, and BUTTON event times from each
block are used to create data files for statistical analysis. For neurological
research, samples between SFIX and EFIX events can be processed to
determine smooth-pursuit accuracy and gain. In some cases, an entire block of
samples may need to be read and stored in data arrays for more complex
processing. For all of these, the organization and contents of the ASC files have
been designed to simplify the programmer's task.