Giter VIP home page Giter VIP logo

bart's Introduction

Background

This repo includes Matlab files needed to run a continuous time version of the Balloon Analogue Risk Task. In this version, subjects click the joystick trigger or the left or right arrow on the keyboard once to start the balloon inflating, once to stop. Trials come in three levels of risk (yellow, orange, red, in decreasing mean pop time). In addition, there are control trials in which a gray ring surrounds the balloon. The balloon will inflate to this point regardless of subjects' input. Some of these trials also offer 0 reward (gray balloon).

Flow

bartc.m is the main task file. It calls various setup files, including

  • setup_data_file.m (to create the directory structure for saving files)
  • setup_audio.m (to load the wav files stored in the directory into Matlab's memory)
  • bind_keys.m (to define various keyboard aliases)
  • setup_geometry.m (to define various screen constants and geometric variables)
  • setup_plexon.m (electrophysiology recording equipment setup)
  • setup_joystick.m (what it sounds like)
  • setup_pars.m (to define lots of task parameters, including the distributions of balloon pop times, the numbers of trials of each type, etc.)

In its main loop, bartc.m checks for ESC with esc_check.m. It uses mark_event.m to send event timestamps to Plexon and save them to a data structure to be written out to disk. As for individual trials

  • open_trial.m sets up variables for a given trial (in truth, not much happens here)
  • handle_input.m and handle_input2.m check for user input and determine what action the program should take (only the latter is currently used)
  • run_outcome.m displays animation related to the trial's outcome (bank, pop, etc.) and plays sound
  • paint_screen.m is called by multiple functions to draw the display onscreen in response to a struct variable in the Matlab code
  • close_trial.m writes out variables for this trial to a file (appending)

bart's People

Contributors

jmxpearson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

elliothsmith

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.