Skip to content

vekteo/GoNoGo_jsPsych

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Go-NoGo task created with jsPsych.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published