Skip to content

arnohakk/TriPy

Repository files navigation

TriPy

A toolbox for creating joint attention paradigms with a virtual agent

When using this code (or parts of it), please cite the following paper:

Hartz, A., Guth, B., Jording, M., Vogeley, K., & Schulte-Rüther, M. (2021). Temporal Behavioral Parameters of On-Going Gaze Encounters in a Virtual Environment. Frontiers in Psychology, 12, 673982. https://doi.org/10.3389/fpsyg.2021.673982

Creative Commons License
TriPy by Arne Hartz and Martin Schulte-Rüther is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Main contributors: Arne Hartz, Björn Guth, and Martin Schulte-Rüther

Dependencies

Currently, only out-of-the-box support for Tobii SKD is given. As this toolbox is based on PyGaze adaption should cost minimal effort.

Running a experiment

  • Start a console in folder containing run_experiment.py
  • Run python run_experiment.py to start the default paradigm
  • Run python run_experiment.py --exp_tpye <name> to start paradigm defined in file studies/<name>

Compiler flags for usage for testing/development

  • -c / --auto_create: Creates automatically an agent
  • -a/--draw_aois: Draw boxes around used AOIs
  • -f: Skips the entire calibration and uses the most recent calibrations instead
  • -i/--skip_instr: Skips the instruction screen at the beginning of the paradigm
  • -k/--skip_key_input: No key input needed to continue during all instruction screens
  • -o/--options: Set a special VARIABLE to a given VALUE
  • -t: Enters pre-set test data (Name, sex, age) of test subject automatically
  • -r: Reloads previously used proband
  • -d, --delete: Deletes test proband log files (1337_H4x0r) before starting the paradigm. Should be used in combination with -t when same block as before is wanted
  • --exp_type: Select an experiment type: basic or ja_nirs, their corresponding config file will be imported
  • --gaze_cursor: Show gaze cursor ??
  • --agent: Define the agent, which will be used
  • --code: Sets the subject code used for saving the data ??
  • --runs: Number of runs, the defined agent will do
  • --gui: Only run the setup window
  • --screenshots: Capture screenshots
  • --aoi_border_size: Thickness of the AOI box border
  • --stopwatch: Run a stopwatch during the experiment, printing the current time every SEC
  • --force_quit: Force experiment to quit at the end
  • --gamify: Give points and keep score
  • --block: Set block to run

Important files

  • agents.py: Code for agent behavior
  • run_experiment.py: Starting experiment, screen presentation
  • studies/basic.py: Example paradigm
  • experiment_parameters.py: All experimental options can also be defined here and these default values will be overwritten by definitions in studies/<study_name>.py when running python run_experiment.py --exp_type <study_name>