Giter Site home page Giter Site logo

paradigms's Introduction

Paradigms

This repository collects code for various experimental paradigms.

Currently, I am building only in PsychoPy, but in the future I will likely include Psychtoolbox.

Each task is self-contained into its own directory along with necessary resource files. To run a paradigm, simply load it into the "Coder View" in PsychoPy, then click the "Run" button.

If you need to adjust screen resolution settings, you can do so in the paradigm's main file (at the topmost section of the code).

Contents

Current Paradigms

Operation Span (OPSPAN)

This is a working memory task as described in:

  • Unsworth, N. et al. (2005) An automated version of the operation span task. Behav. Res. Methods 37, 498–505

Credit is owed to Titus von der Malsburg for the equations and consonants file, which I took from his OPSPAN implementation py-span-task. Titus' package is great, and includes an R script to calculate performance.

The PsychoPy implementation I have included attempts to retain as much fidelity as possible to the implementation in Unsworth et al. (2005). Some notable exceptions include:

  • Equations were all presented on one line, as in Titus von der Malsburg's version
  • Subjects type in the letters they had to memorize, rather than selecting from those placed on a grid
  • There is no feedback for number of equations correctly solved. The authors of that paper provided a visual indicator of percentage complete. I omitted this to minimize the number of elements displayed on the screen.

Output

The OPSPAN output will be a .csv file including the subject ID, which is collected at the outset through a GUI. The column headings are as follows:

Column Head Description
subject_id The subject's unique id
iteration Each span length is presented for (n iterations). Default is 3 iterations for 5 spans (3-7 characters).
span The number of characters in the current trial. As per Unsworth et al. (2005), the default is 3 to 7
correct Binary. Whether the characters were correctly recalled at the end of a trial.
math_accuracy The percentage of correct answers to equation portions
n_math_timeout Number of equations in which there was a timeout. For the absolute scoring system in Unsworth et al. (2005), if the user times out on an equation during a span trial, the trials should not be counted as correct.
mathrt_mean Mean reaction time for math problems
mathrt_sd Standard deviation of reaction time for math problems
mathrt_max Maximum reaction time during math problems for that given span trial.

Two-Step task

This is an implementation of the two-step task from the following paper:

  • Daw, N.D. et al. (2011) Model-based influences on humans’ choices and striatal prediction errors. Neuron 69, 1204–1215

My implementation does not yet have a training phase, which I am working on adding at the moment.

The default parameters for the task can be set at the top of the twostep.py file.

Output

This task produces a .csv file with the following column headings

Column Head Description
'subject_id' Subject ID, collected from initial GUI
'step2state' The second step state. (First step states are always the same, so they are not listed)
'choice1' First step choice
'choice2' Second step choice
'reward' Reward received at trial
'rt_step1' Step 1 choice reaction time
'rt_step2' Step 2 choice reaction time
'key_step1' Key pressed at step 1 choice. Since the stimuli are randomly alternated between the left and right sides, these keys are recorded in order to determine whether subjects are not pressing the same key for most trials.
'key_step2' Key pressed at step 2 choice

paradigms's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wozu-dichter

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.