GithubHelp home page GithubHelp logo

vekteo / gonogo_jspsych Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 5.16 MB

A Go-NoGo task created with jsPsych.

License: MIT License

JavaScript 70.54% HTML 18.11% CSS 0.53% Jupyter Notebook 10.83%

gonogo_jspsych's Introduction

GoNoGo_JSPsych

Created by the MEMO Team of Lyon Neuroscience Research Center (CRNL) (PI: Dezso Nemeth)

A Go/NoGo Task created with JSPsych de Leeuw, J. R., 2015., based on the implementation of Bezdjian et al. (2009).

Structure of the Task

A grid of four squares appears on the screen. A blue star appears in each squares. From time to time, a P or an R letter appears in one of the four squares. In the first part of the task, the task is to press the space button as soon as possible, when they see the letter P (Go). When an R appears, they do not have to press any button, i.e., they have to withhold their responses (No-Go). In the second part of the task, they have to press space when they see an R, and they have to withhold their responses when they see a P.

The task starts with a 20-trial practice session. Here, the user receives feedback whether their answer was correct. After that, the task begins, and the users don't receive feedback on their responses anymore. The first part consist of 160 trials. 128 of the 160 trials are Go-trials, and 32 of them are No-Go-trials. The ratio of the Go:No-Go trials are therefore 80:20. Each trial appears on the screen for 500 ms (or until response) with an interstimulus interval of 1500 ms.

At the end of the first part, the new instructions are presented. After that, a 20-trial practice session starts again with feedback. Then the second part starts which contains again 160 trials with (80% of Go and 20% of No-Go responses).

At the end of the task, a feedback about the overall accuracy is presented on the screen, and the data are downloaded to the local machine in .csv format.

Output file

  • success: whether fullscreen mode was successfully started/ended (true or false)
  • trial_type: JSPSych trialtype of the given trial (fullscreen, instructions or image-keyboard-response)
  • trial_index: the number of the given trials (all events considered, even instructions, feedbacks!)
  • time_elapsed: the time elapsed from the start of the script in ms
  • subject: A 15-character long random subject ID for the online version, and customized subject number for the offline version)
  • session: customized session number (for offline version only))
  • internal_code_id: internal node id of the trial
  • browser_events: browser events during the task (fullscreenenter, fullscreenexit, blur or focus)
  • view_history: viewing history during the instruction trials
  • rt: the reaction time for the Go or NoGo trials in ms
  • stimulus: stimulus on the screen in HTML
  • key_press: number code of the key pressed
  • RorP: whether the stimulus presented were P or R
  • GoNoGo: whether the stimlus presented required Go or NoGo response
  • position: the position of the stimulus (1: top left, 2: top right, 3: bottom left, 4: bottom right)
  • correct_key: the key that should be pressed (32 for space, null for no keypress)
  • is_practice: whether the stimulus is presented as a practice stimulus (1 - yes, 0 - no)
  • goLetter: the letter which requires Go response in the current part of the task
  • trial_number: the trial number within the given part (1-20 for the practice trials, 1-160 for the two parts)
  • correct: whether or not correct responses were given (1 - correct, 0 - incorrect)

Setting options

In the parameters.js file you have the opportunity to slightly modify the task. By setting the variable numberOfRepetitions, you can modify how many times you want to include 20 trials for the task. The default is 8 (8ร—20 = 160).
You can also set the language of the task by modifying the varablei language. The currently available languages are enligsh (en) and hungarian (hu).

How to start the task

Open the index.html file in either the offline or online folder. When the offline version is started, you can customize the subject and session numbers (any number is accepted). If you start the offline version, a random subject ID will be allocated.

Browser requirements

Any browser except Safari and Internet Explorer.

gonogo_jspsych's People

Contributors

vekteo avatar

Watchers

 avatar

Forkers

bml-lab

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.