TrajTracker analysis toolbox: File formats

This page describes the raw data files - the output of the experiment software, which serve as the input to this toolbox.

Each experiment session (one block of one subject) results in 3 files: * XML file with general info about the session * CSV file with trials information (one line per trial) * CSV file with trajectory information (one line per sampled point)

The column names in the CSV files are case insensitive.

Contents

session.xml file

This file must be named "session_xxxxx.xml" (where xxxxx can be anything)

The file format is hereby detailed:

<data>
   <source>
     <software name="TrajTracker" version="0.0.1"/>
     <paradigm name="NL" version="1.0"/>
   </source>
   <subject id="js">
      <name>John Smith</name>
   </subject>
   <session start-time="YYYY-MM-DD HH:MM">
      <exp_level_results>
         <data name="a" value="10.0" type="number"/>
         <data name="b" value="hello" type="str"/>
      </exp_level_results>
      <files>
         <file type="trials" name="trials_js.csv"/>
          <file type="trajectory" name="trajectory_js.csv"/>
      </files>
   </session>
</data>

Explanations:

In these explanations, the notation "x.y" refers to attribute "y" in block "x"

The exp_level_results block must contain the following numeric entries:

In number-to-position experiments, the following entries must appear too:

In discrete-choice experiments, the following entries must appear too:

To validate the format of your XML file, you can try loading it by calling tt.preprocess.loadSessionFile(filename)

Trials file

This is a CSV file with per-trial information.

In this file, as well as in the trajectory file, the time-within-trial information is specified relatively to the beginning of the trial. This is not necessarily the time when the finger started moving, or the time when the target was presented.

Columns in the trials file (header line case insensitive):

Additional columns can be loaded using the "CustomCols" argument of tt.preprocessSet().

Trajectory file

This CSV file has one line per sample - i.e., multiple lines per trial.

Columns:

The coordinate systems

TrajTracker-Experiment saves trajectory data using the screen's coordinate system: (0,0) is the middle of the screen, and the number of pixels depends on the system settings. Positive x values are the right side of the screen, and positive y values are on top of the screen.

When preprocessing the data into matlab objects, the coordinate system is changed, such that:

To enable conversion between these logical coordinate systems and the screen pixels, we maintain the scaling factor between them on the experiment data (ExperimentData.PixelsPerUnit).

The coodinate system conversion relies on several entries that must appear the exp_level_results block in the session.xml file: WindowWidth, WindowHeight, TrajZeroCoordX, TrajZeroCoordY. For number-to-position experiments, the conversion also requires NLDistanceFromTop. See above for details about all these entries.