GithubHelp home page GithubHelp logo

vekteo / digit_span_jspsych Goto Github PK

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

A classical Digit Span Task created with jsPsych.

License: MIT License

JavaScript 72.06% HTML 18.43% CSS 0.52% Jupyter Notebook 8.99%

digit_span_jspsych's Introduction

Digit Span Task created with jsPsych

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

A Digit Span Task created with jsPsych de Leeuw, J. R., 2015.

Citation

If you use the script, please include this citation in your manuscript:

Vékony, T. (2021). Digit Span Task created with jsPsych (Version 1.0.0) [Computer software]. https://doi.org/10.5281/zenodo.7096258 DOI

Structure of the task

One digit (1-9) per second appears one the screen (only one at a time). The task of the user is to try to remember the digits in their order of appearance. After a few digits, a textbox appears on the screen and the user have to type in their answer. The answer can be submitted by clicking on the 'Continue' button, or by hitting Enter.

The Digit Span task. The user has to try to remember the presented digits in their order of appearance.

The task starts with two practice runs (with 2 digits per run). Here, the user receive feedback whether their answer was correct. After the two practice runs, the task begins. Altogether, seven levels can be completed. On the first level, three digits are presented, and on each level, the length of the digit stream become one digit longer (i.e., the maximum length is 9 digits). Each level contains four trials. If the user answers correctly in three out of the four trials, the next level is presented. If the level is not completed successfully (i.e., the user answers correctly for less than three trials), the task ends.

Output file

  • success: whether fullscreen mode was successfully started/ended (true or false)
  • trial_type: jsPsych trialtype of the given trial (fullscreen, html-keyboard-response or survey-html-form)
  • 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 online version, and customized subject number for offline version
  • session: customized session number (for offline version only)
  • internal_code_id: internal node id of the trial
  • browser_event: browser events at the given trial (fullscreenenter, fullscreenexit, blur or focus)
  • view_history: viewing data about the instruction trial
  • rt: the reaction time for submitting the answer
  • test_part: the part of the task (instruction, start_practice, stimulus, answer, feedback, start_task, debrief)
  • stimulus: stimulus on the screen in HTML
  • key_press: number code of the key pressed
  • level: the level of the task (2 for the practice runs, 3-9 for the task runs)
  • correct_answer: the stimulus stream, the correct answer
  • number_within_level: the number of the trial within the given level (1-2 for the practice runs, 1-4 for the task runs)
  • number_within_run: the number of the stimulus within the run (1-2 for the practice runs, 1-9 for the task runs)
  • is_mistake: if the answer given was uncorrect (0 - the answer was correct; 1 - the answer was incorrect)
  • responses: the answer typed in the input field (in an object)
  • digit_span: the digit span score (the length of the run where at least 3/4 trials were correctly remembered)

Setting options

You can set the following parameters by modifying the parameters.js file:

  • duration of the stimulus (in ms): the digits' presentation time (default: 1000 ms)
  • language: currently available languages are: english (en), hungarian (hu), spanish (es), french (fr), portuguese (pt)

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. Recommended: Chrome

digit_span_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.