Now Shipping! – The EyeLink 3; combined head and eye tracking at up to 1000 Hz.

FAQ: How do I save behavioral data in a text file?
#1
If your experiment uses a Data Source or Variables, you can save this data to a .txt results file. This is essential for non-eye-tracking experiments that do not generate an EDF file.

This process uses two main nodes:
  • RESULTS_FILE: This node configures what data to save and the name of the output file.
  • ADD_TO_RESULTS_FILE: This node acts as a trigger that writes a new line of data to the file at a specific point in your experiment.


Basic Setup: Creating a Single Results File
  1. Add the RESULTS_FILE Node:
    • Find the RESULTS_FILE node in the "Other" section of the node list and place it anywhere in your project's graph.
    • This node does not need to be connected to your experiment flow.
  2. Configure the File:
    • Double click the RESULTS_FILE node you just added.
    • In its properties, use the Columns property to select which Data Source columns and variables you want to save. (By default, all are selected).
    • Change the Label property to give your output file a descriptive name (e.g., "Behavioral_Data"). This label will become the filename (e.g., Behavioral_Data.txt).
  3. Add the Trigger Node:
    • Place an ADD_TO_RESULTS_FILE node in your experiment flow at the point where you want to save data (typically at the end of each trial).
    • Each time this node is executed, it will write a new row to the text file with the current values of the columns you selected.
   



Advanced Setup: Creating Multiple Results Files
You can create multiple, separate results files within a single experiment (e.g., one for practice trials and another for main trials).
  • Create Multiple RESULTS_FILE Nodes: Add a separate RESULTS_FILE node for each output file you need. Configure the Label and Columns for each one independently.
  • Use Multiple ADD_TO_RESULTS_FILE Nodes: Place trigger nodes at the appropriate points in your experiment flow.
  • Link Triggers to Files: For each ADD_TO_RESULTS_FILE node, use its ResultsFile property to select which of your RESULTS_FILE nodes it should write to.


Example Project
The "Stroop" project (File -> Examples -> Stroop) provides a clear example of how to implement a RESULTS_FILE in a non-eye-tracking experiment.