Personal tools
You are here: Home Documentation Running JCT experiments GDF format

GDF format

Specification of the GDF format and a sample GDF file

GDF format

The following section show the GDF format and a sample GDF file. The GDF files are generated from the JCT output and so do not need to be stored, but are used to generate the ELAN and NXT data, and cam be used for intermediate analysis.

Sample DTD file

<!ELEMENT gdf (trial+)>
<!ATTLIST gdf experimentfile CDATA #REQUIRED>

<!ELEMENT trial (subject+, parts, regions, cursors)>
<!ATTLIST trial id ID #REQUIRED>
<!ATTLIST trial stimulusset CDATA #REQUIRED>
<!ATTLIST trial starttime CDATA #REQUIRED>
<!ATTLIST trial endtime CDATA #REQUIRED>

<!ELEMENT subject (eyes, looks, actions)>
<!ATTLIST subject id ID #REQUIRED>

<!ELEMENT eyes (blink | saccade | fixation)*>

<!ELEMENT blink EMPTY>
<!ATTLIST blink start CDATA #REQUIRED>
<!ATTLIST blink end CDATA #REQUIRED>

<!ELEMENT saccade EMPTY>
<!ATTLIST saccade start CDATA #REQUIRED>
<!ATTLIST saccade end CDATA #REQUIRED>

<!ELEMENT fixation EMPTY>
<!ATTLIST fixation start CDATA #REQUIRED>
<!ATTLIST fixation end CDATA #REQUIRED>
<!ATTLIST fixation x CDATA #REQUIRED>
<!ATTLIST fixation y CDATA #REQUIRED>
<!ATTLIST fixation dilation CDATA #REQUIRED>

<!ELEMENT looks (look)*>

<!ELEMENT look EMPTY>
<!ATTLIST look start CDATA #REQUIRED>
<!ATTLIST look end CDATA #REQUIRED>
<!ATTLIST look object IDREF #REQUIRED>

<!ELEMENT mouse (move|hover|rotate)*>

<!ELEMENT move EMPTY>
<!ATTLIST move start CDATA #REQUIRED>
<!ATTLIST move end CDATA #REQUIRED>
<!ATTLIST move part IDREF #REQUIRED>
<!ATTLIST move endx CDATA #REQUIRED>
<!ATTLIST move endy CDATA #REQUIRED>

<!ELEMENT hover EMPTY>
<!ATTLIST hover start CDATA #REQUIRED>
<!ATTLIST hover end CDATA #REQUIRED>
<!ATTLIST hover object IDREF #REQUIRED>

<!ELEMENT rotate EMPTY>
<!ATTLIST rotate start CDATA #REQUIRED>
<!ATTLIST rotate end CDATA #REQUIRED>
<!ATTLIST rotate part IDREF #REQUIRED>
<!ATTLIST rotate angle CDATA #REQUIRED>

<!ELEMENT parts (part+, composite*)>
<!ATTLIST parts filename CDATA #REQUIRED>

<!ELEMENT part (#PCDATA)>
<!ATTLIST part id ID #REQUIRED>
<!ATTLIST part start CDATA #REQUIRED>
<!ATTLIST part end CDATA "-1">
<!ATTLIST part broken (true|false) "false">
<!ATTLIST part startx CDATA #REQUIRED>
<!ATTLIST part starty CDATA #REQUIRED>

<!ELEMENT composite (child, child)>
<!ATTLIST composite id ID #REQUIRED>
<!ATTLIST composite start CDATA #REQUIRED>
<!ATTLIST composite end CDATA "-1">
<!ATTLIST part broken (true|false) "false">

<!ELEMENT child EMPTY>
<!ATTLIST child ref IDREF #REQUIRED>
<!ATTLIST child x CDATA #REQUIRED>
<!ATTLIST child y CDATA #REQUIRED>
<!ATTLIST child rotation CDATA #REQUIRED>

<!ELEMENT regions (region)*>

<!ELEMENT region (#PCDATA)>
<!ATTLIST region id ID #REQUIRED>
<!ATTLIST region topleft CDATA #REQUIRED>
<!ATTLIST region topright CDATA #REQUIRED>
<!ATTLIST region bottomleft CDATA #REQUIRED>
<!ATTLIST region bottomright CDATA #REQUIRED>

<!ELEMENT cursors (cursor)*>

<!ELEMENT cursor EMPTY>
<!ATTLIST cursor id ID #REQUIRED>
<!ATTLIST cursor type (mouse|eye) #REQUIRED>
<!ATTLIST cursor owner IDREF #REQUIRED>

Sample XML file

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE gdf SYSTEM "gdf.dtd">
<gdf experimentfile="JastExpt?.xml">
 <trial stimulusset="Stimulus01.xml" starttime="00:00:21.2" endtime="00:06:43.7" id="trial01">
  <subject id="client">
   <eyes>
    <blink start="1000" end="2000" />
    <fixation start="2000" end="3000" x="5" y="10" dilation="213" />
    <saccade start="3000" end="4000" />
   </eyes>
   <looks>
    <look start="3000" end="4000" object="863"/>
   </looks>
   <mouse>
    <move start="3500" end="4000" part="863" endx="10" endy="10" />
    <hover start="3300" end="3400" object="863" />
    <rotate start="3400" end="3450" part="863" angle="12.0" />
    <hover start="3450" end="3500" object="863" />
   </mouse>
  </subject>
  <subject id="server">
   <eyes>
    <blink start="1000" end="2000"/>
   </eyes>
   <looks>
   </looks>
   <mouse>
   </mouse>
  </subject>
  <parts filename="AeroplaneStimulusSet?.xml">
   <part id="863" startx="5" starty="5" start="2000" end="4000" broken="true">wing</part>
   <part id="801" startx="20" starty="20" start="4000">wing</part>
   <part id="965" startx="30" starty="40" start="2100">wingtip</part>
   <composite id="10005" start="4500">
    <child ref="965" x="30" y="40" rotation="0.0" />
    <child ref="801" x="20" y="20" rotation="0.0" />
   </composite>
  </parts>
  <regions>
   <region id="targetconfig" topleft="0" topright="0" bottomleft="640" bottomright="480">Target Config</region>
   <region id="clock" topleft="10" topright="10" bottomleft="50" bottomright="100">Clock</region>
   <region id="score" topleft="0" topright="0" bottomleft="5" bottomright="5">Score</region>
   <region id="newparts" topleft="400" topright="400" bottomleft="0" bottomright="640">New Parts</region>
   <region id="workarea" topleft="*" topright="*" bottomleft="*" bottomright="*">Work Area</region>
  </regions>
  <cursors>
   <cursor type="mouse" owner="client" id="cm" />
   <cursor type="eye" owner="client" id="ce" />
   <cursor type="mouse" owner="server" id="sm" />
   <cursor type="eye" owner="server" id="se" />
  </cursors>
 </trial>
</gdf>
Document Actions