From 97e1dc72b97bc743a0584aca118df0b99e8903f4 Mon Sep 17 00:00:00 2001 From: jadeddelta <101148768+jadeddelta@users.noreply.github.com> Date: Fri, 23 Sep 2022 22:00:39 -0400 Subject: [PATCH] grammar + shift from subject to participant --- contributors.md | 1 + docs/demos/jspsych-external-html-demo1.html | 2 +- docs/developers/configuration.md | 2 +- docs/extensions/mouse-tracking.md | 2 +- docs/overview/data.md | 2 +- docs/overview/dynamic-parameters.md | 4 +- docs/overview/exclude-browser.md | 4 +- docs/overview/experiment-options.md | 6 +-- docs/overview/media-preloading.md | 2 +- docs/overview/mturk.md | 10 ++-- docs/overview/plugins.md | 4 +- docs/overview/progress-bar.md | 4 +- docs/plugins/animation.md | 12 ++--- docs/plugins/audio-button-response.md | 14 ++--- docs/plugins/audio-keyboard-response.md | 16 +++--- docs/plugins/audio-slider-response.md | 16 +++--- docs/plugins/canvas-button-response.md | 12 ++--- docs/plugins/canvas-keyboard-response.md | 14 ++--- docs/plugins/canvas-slider-response.md | 12 ++--- docs/plugins/categorize-animation.md | 14 ++--- docs/plugins/categorize-html.md | 16 +++--- docs/plugins/categorize-image.md | 16 +++--- docs/plugins/external-html.md | 8 +-- docs/plugins/html-button-response.md | 14 ++--- docs/plugins/html-keyboard-response.md | 16 +++--- docs/plugins/html-slider-response.md | 14 ++--- docs/plugins/iat-html.md | 12 ++--- docs/plugins/iat-image.md | 12 ++--- docs/plugins/image-button-response.md | 16 +++--- docs/plugins/image-keyboard-response.md | 18 +++---- docs/plugins/image-slider-response.md | 16 +++--- docs/plugins/instructions.md | 16 +++--- docs/plugins/list-of-plugins.md | 60 ++++++++++----------- docs/plugins/maxdiff.md | 2 +- docs/plugins/reconstruction.md | 4 +- docs/plugins/same-different-html.md | 24 ++++----- docs/plugins/same-different-image.md | 24 ++++----- docs/plugins/serial-reaction-time-mouse.md | 4 +- docs/plugins/serial-reaction-time.md | 8 +-- docs/plugins/sketchpad.md | 2 +- docs/plugins/survey-html-form.md | 6 +-- docs/plugins/survey-likert.md | 4 +- docs/plugins/survey-multi-choice.md | 4 +- docs/plugins/survey-multi-select.md | 4 +- docs/plugins/survey-text.md | 6 +-- docs/plugins/survey.md | 2 +- docs/plugins/video-button-response.md | 14 ++--- docs/plugins/video-keyboard-response.md | 16 +++--- docs/plugins/video-slider-response.md | 14 ++--- docs/plugins/visual-search-circle.md | 12 ++--- docs/plugins/webgazer-calibrate.md | 2 +- docs/reference/jspsych-pluginAPI.md | 2 +- docs/reference/jspsych.md | 10 ++-- docs/support/support.md | 2 +- docs/tutorials/rt-task.md | 22 ++++---- packages/plugin-reconstruction/package.json | 2 +- 56 files changed, 289 insertions(+), 288 deletions(-) diff --git a/contributors.md b/contributors.md index fe53d595..7e68072c 100644 --- a/contributors.md +++ b/contributors.md @@ -22,6 +22,7 @@ The following people have contributed to the development of jsPsych by writing c * Rui Han - https://github.com/hrcn * Andy Heusser - https://github.com/andrewheusser * Angus Hughes - https://github.com/awhug +* jadeddelta - https://github.com/jadeddelta * Gustavo Juantorena - https://github.com/GEJ1 * Chris Jungerius - https://github.com/cjungerius * George Kachergis - https://github.com/kachergis diff --git a/docs/demos/jspsych-external-html-demo1.html b/docs/demos/jspsych-external-html-demo1.html index c29bf52d..c1135ecd 100644 --- a/docs/demos/jspsych-external-html-demo1.html +++ b/docs/demos/jspsych-external-html-demo1.html @@ -13,7 +13,7 @@ const jsPsych = initJsPsych(); - // sample function that might be used to check if a subject has given + // sample function that might be used to check if a participant has given // consent to participate. const check_consent = function(elem) { if (document.getElementById('consent_checkbox').checked) { diff --git a/docs/developers/configuration.md b/docs/developers/configuration.md index 6b4cf2d3..01565f7c 100644 --- a/docs/developers/configuration.md +++ b/docs/developers/configuration.md @@ -89,7 +89,7 @@ The build chain will read the package (starting at its `src/index.ts` file) and Automated code testing for jsPsych is implemented with [Jest](https://jestjs.io/). -To run the tests, install Node and npm. Run `npm install` in the root jsPsych directory. Then run `npm test`. You can also run `npm test` in the directory of the package that you would like to test. For example, if you are developing tests for the `html-keyboard-response` plugin you can run `npm test` in `/packages/plugin-html-keyboard-response`. +To run the tests, install Node and npm. Run `npm install` in the root jsPsych directory. Then run `npm test`. You can also run `npm test` in the directory of the package that you would like to test. For example, if you are developing tests for the `html-keyboard-response` plugin you can run `npm test` in `/packages/plugin-html-keyboard-response`. If you want to run one file from the root directory, using the aforementioned example, you can run `npm test -- /packages/plugin-html-keyboard-response/src/index.spec.ts`. Tests for the core jsPsych library are located in `/packages/jspsych/tests`. diff --git a/docs/extensions/mouse-tracking.md b/docs/extensions/mouse-tracking.md index 81ea58f8..1ef3a0e6 100644 --- a/docs/extensions/mouse-tracking.md +++ b/docs/extensions/mouse-tracking.md @@ -1,7 +1,7 @@ # mouse-tracking This extension supports mouse tracking. -Specifically, it can record the `x` `y` coordinates and time of [mousemove events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event), [mousedown events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event), and [mouseup events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event). +Specifically, it can record the `x` and `y` coordinates, along with the time of [mousemove events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousemove_event), [mousedown events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mousedown_event), and [mouseup events](https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseup_event). It also allows recording of the [bounding rectangle](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect) of elements on the screen to support the calculation of mouse events relative to different elements. ## Parameters diff --git a/docs/overview/data.md b/docs/overview/data.md index 0d96bd59..ef6e40cc 100644 --- a/docs/overview/data.md +++ b/docs/overview/data.md @@ -272,7 +272,7 @@ function saveData() { } ``` -It's important that the `XMLHttpRequest` is able to complete before the experiment is closed. If you invoke the `saveData()` function at the end of your experiment and the subject closes the window before all of the data has been transferred you will lose that data. To mitigate this risk, you can use the `call-function` plugin's `async` option to prevent the experiment from progressing until the request is complete. +It's important that the `XMLHttpRequest` is able to complete before the experiment is closed. If you invoke the `saveData()` function at the end of your experiment and the participant closes the window before all of the data has been transferred you will lose that data. To mitigate this risk, you can use the `call-function` plugin's `async` option to prevent the experiment from progressing until the request is complete. ```javascript var trial = { diff --git a/docs/overview/dynamic-parameters.md b/docs/overview/dynamic-parameters.md index 6aa1d0cf..c9405e0e 100644 --- a/docs/overview/dynamic-parameters.md +++ b/docs/overview/dynamic-parameters.md @@ -1,12 +1,12 @@ # Dynamic parameters -Most trial parameters can also be specified as functions. In a typical declaration of a jsPsych trial, parameters are known at the start of the experiment. This makes it impossible to alter the content of the trial based on the outcome of previous trials. However, **when functions are used as the parameter value, the function is evaluated right before the trial starts, and the return value of the function is used as the parameter value for that trial**. This enables dynamic updating of the parameter based on data that a subject has generated or any other information that you do not know in advance. +Most trial parameters can also be specified as functions. In a typical declaration of a jsPsych trial, parameters are known at the start of the experiment. This makes it impossible to alter the content of the trial based on the outcome of previous trials. However, **when functions are used as the parameter value, the function is evaluated right before the trial starts, and the return value of the function is used as the parameter value for that trial**. This enables dynamic updating of the parameter based on data that a participant has generated or any other information that you do not know in advance. ## Examples ### Providing Feedback -Here is a sketch of how this functionality could be used to display feedback to a subject in the Flanker Task. +Here is a sketch of how this functionality could be used to display feedback to a participant in the Flanker Task. ```javascript diff --git a/docs/overview/exclude-browser.md b/docs/overview/exclude-browser.md index 349d4c1c..93405918 100644 --- a/docs/overview/exclude-browser.md +++ b/docs/overview/exclude-browser.md @@ -1,11 +1,11 @@ # Exclude Participants Based on Browser Features *Changed in 7.1* -Online subjects will use many different kinds of browsers. +Online participants will use many different kinds of browsers. Depending on the experiment, it may be important to specify a minimum feature set of the browser. As of v7.1 of jsPsych, the recommended way to do this is using the [browser-check plugin](../plugins/browser-check.md). -This plugin can record many features of the subject's browser and exclude subjects who do not meet a defined set of inclusion criteria. +This plugin can record many features of the participant's browser and exclude participants who do not meet a defined set of inclusion criteria. Please see the [browser-check plugin documentation](../plugins/browser-check.md) for more details. The prior approach of using the `exclusions` parameter in `initJsPsych()` is deprecated and will be removed in `v8.0`. diff --git a/docs/overview/experiment-options.md b/docs/overview/experiment-options.md index 11f3c4c5..70b3e396 100644 --- a/docs/overview/experiment-options.md +++ b/docs/overview/experiment-options.md @@ -39,12 +39,12 @@ Several experiment-wide events can trigger functions. This is documented in more * `on_trial_start`: Called at the beginning of every trial. * `on_trial_finish`: Called at the end of every trial. * `on_data_update`: Called whenever new data is added to the jsPsych data object. -* `on_interaction_data_update`: Called whenever new interaction data (e.g., the subject enters or exits fullscreen mode) is added. -* `on_close`: Called right before the page closes, such as when a subject closes the experiment early. +* `on_interaction_data_update`: Called whenever new interaction data (e.g., the participant enters or exits fullscreen mode) is added. +* `on_close`: Called right before the page closes, such as when a participant closes the experiment early. ## Specify exclusion criteria -Exclusion criteria can be specified based on features of the user's web browser, such as the display size and whether certain features are reported. See the page on [excluding subjects based on browser features](exclude-browser.md). +Exclusion criteria can be specified based on features of the user's web browser, such as the display size and whether certain features are reported. See the page on [excluding participants based on browser features](exclude-browser.md). ## Display a progress bar diff --git a/docs/overview/media-preloading.md b/docs/overview/media-preloading.md index c80425f8..0a7573fc 100644 --- a/docs/overview/media-preloading.md +++ b/docs/overview/media-preloading.md @@ -1,6 +1,6 @@ # Media Preloading -If an experiment uses image, audio, or video files as stimuli, it is a good idea to preload the files before running the experiment. You can preload files at any point in your experiment using the [jsPsych `preload` plugin](../plugins/preload.md). Preloading files means that the subject's browser will download the files and store them in local memory on the subject's computer. This is important because displaying or playing a media file is much faster if it is already in memory on the subject's computer. Without preloading, there will be noticeable delays in the display of media, which will affect any timing measurements (such as how long an image is displayed, or a subject's response time since first viewing an image). For particularly large files, like video, preloading content avoids lengthy pauses in the middle of the experiment that can be disruptive to the flow of the experiment. +If an experiment uses image, audio, or video files as stimuli, it is a good idea to preload the files before running the experiment. You can preload files at any point in your experiment using the [jsPsych `preload` plugin](../plugins/preload.md). Preloading files means that the participant's browser will download the files and store them in local memory on the participant's computer. This is important because displaying or playing a media file is much faster if it is already in memory on the participant's computer. Without preloading, there will be noticeable delays in the display of media, which will affect any timing measurements (such as how long an image is displayed, or a participant's response time since first viewing an image). For particularly large files, like video, preloading content avoids lengthy pauses in the middle of the experiment that can be disruptive to the flow of the experiment. !!! warning Note that video preloading will not work when you run your experiment offline (e.g., by double-clicking on the HTML file), but it will work once your experiment is running online (hosted on a server). The [Cross-origin requests (CORS) and safe mode](running-experiments.md#cross-origin-requests-cors-and-safe-mode) section on the Running Experiments page contains more information about this. diff --git a/docs/overview/mturk.md b/docs/overview/mturk.md index c609d2c6..2895f5f0 100644 --- a/docs/overview/mturk.md +++ b/docs/overview/mturk.md @@ -1,6 +1,6 @@ # Integrating with Mechanical Turk -A common use of jsPsych is to build an online experiment and find subjects using [Mechanical Turk](http://www.mturk.com/). Once an experiment is available through a web server and data is being [saved on the server](data.md), connecting the experiment with Mechanical Turk takes only a few additional steps. jsPsych has some built-in functionality to assist with this process. +A common use of jsPsych is to build an online experiment and find participants using [Mechanical Turk](http://www.mturk.com/). Once an experiment is available through a web server and data is being [saved on the server](data.md), connecting the experiment with Mechanical Turk takes only a few additional steps. jsPsych has some built-in functionality to assist with this process. ## The jsPsych.turk module @@ -8,7 +8,7 @@ The [jsPsych.turk](../reference/jspsych-turk.md) module contains functions that ## Creating an advertisement page -When potential subjects view your experiment on Mechanical Turk, they will be able to see a single webpage before deciding whether or not to accept the HIT (start the experiment). This first page is often used as an advertisement for the experiment, similar to posting a flier in a department hallway. The important thing to remember about this page is that potential subjects will be able to interact with it even if they haven't accepted the HIT. Therefore, it can be useful to change the content of the page depending on whether the HIT has been accepted or not. This is relatively easy to do: +When potential participants view your experiment on Mechanical Turk, they will be able to see a single webpage before deciding whether or not to accept the HIT (start the experiment). This first page is often used as an advertisement for the experiment, similar to posting a flier in a department hallway. The important thing to remember about this page is that potential participants will be able to interact with it even if they haven't accepted the HIT. Therefore, it can be useful to change the content of the page depending on whether the HIT has been accepted or not. This is relatively easy to do: ```html . @@ -33,7 +33,7 @@ One important issue with advertisement pages is that they must be served using t ## Getting the worker ID -Every account on Mechanical Turk is given a unique identification string. Recording this ID is a useful way to keep track of who is doing your experiment. In particular, while Turk has built in tools for preventing the same person from doing a HIT more than once, there may be cases where you don't want subjects to complete related experiments. If you store the worker ID of every person who starts an experiment in a database, then you can exclude people by running a query on the database to check for the ID. jsPsych can get the workerID, assignmentID, and hitID with the turkInfo method. +Every account on Mechanical Turk is given a unique identification string. Recording this ID is a useful way to keep track of who is doing your experiment. In particular, while Turk has built in tools for preventing the same person from doing a HIT more than once, there may be cases where you don't want participants to complete related experiments. If you store the worker ID of every person who starts an experiment in a database, then you can exclude people by running a query on the database to check for the ID. jsPsych can get the workerID, assignmentID, and hitID with the turkInfo method. ```javascript var turkInfo = jsPsych.turk.turkInfo(); @@ -52,7 +52,7 @@ Recording the workerId at the start of the experiment is also a good way to trac ## Submitting results to Mechanical Turk -If you are running a HIT on Mechanical Turk using the ExternalQuestion template, then you'll need to provide a way for subjects to indicate that they have completed the HIT. (If you are using another template, then the template will provide this code for you). jsPSych makes this a relatively easy task. A common strategy for external HITs is to display an HTML page on the Mechanical Turk website that links to your HIT. Subjects click the link, which opens the actual experiment content in a new browser window or tab, allowing the experiment to take up the whole browser window instead of just the iframe that displays content on Mechanical Turk. +If you are running a HIT on Mechanical Turk using the ExternalQuestion template, then you'll need to provide a way for participants to indicate that they have completed the HIT. (If you are using another template, then the template will provide this code for you). jsPSych makes this a relatively easy task. A common strategy for external HITs is to display an HTML page on the Mechanical Turk website that links to your HIT. Participants click the link, which opens the actual experiment content in a new browser window or tab, allowing the experiment to take up the whole browser window instead of just the iframe that displays content on Mechanical Turk. On this page, you might include a submit button for workers to indicate that they have finished the experiment. The page would look something like this: @@ -70,7 +70,7 @@ function sendData() { ``` -When workers click the button, the contents of the `code` text field will be sent to Mechanical Turk, and you'll be able to view the subjects and the codes that they entered in the Mechanical Turk GUI. You can then approve or reject work using the Mechanical Turk website. +When workers click the button, the contents of the `code` text field will be sent to Mechanical Turk, and you'll be able to view the participants and the codes that they entered in the Mechanical Turk GUI. You can then approve or reject work using the Mechanical Turk website. ## Limitations diff --git a/docs/overview/plugins.md b/docs/overview/plugins.md index 78e6e646..ed90b135 100644 --- a/docs/overview/plugins.md +++ b/docs/overview/plugins.md @@ -5,7 +5,7 @@ Some plugins define very general events, like [displaying a set of instructions Other plugins are more specific, like those that display particular kinds of stimuli (e.g., a [circular visual search array](../plugins/visual-search-circle/)), or run a specific version of particular kind of task (e.g., the [Implicit Association Test](../plugins/iat-image/)). Part of creating an experiment with jsPsych involves figuring out which plugins are needed to create the tasks you want your participants to perform. -Plugins provide a structure for a particular trial or task, but often allow for significant customization and flexibility. For example, the [image-keyboard-response plugin](../plugins/image-keyboard-response/) defines a simple structure for showing an image and collecting a keyboard response. You can specify the what the stimulus is, what keys the subject is allowed to press, how long the stimulus should be on the screen, how long the subject has to respond, and so on. Many of these options have reasonable default values; even though the image plugin has many different parameters, you only *need* to specify the image stimulus in order to use it. Each plugin has its own documentation page, which describes what the plugin does, what options are available, and what kind of data it collects. +Plugins provide a structure for a particular trial or task, but often allow for significant customization and flexibility. For example, the [image-keyboard-response plugin](../plugins/image-keyboard-response/) defines a simple structure for showing an image and collecting a keyboard response. You can specify the what the stimulus is, what keys the participant is allowed to press, how long the stimulus should be on the screen, how long the participant has to respond, and so on. Many of these options have reasonable default values; even though the image plugin has many different parameters, you only *need* to specify the image stimulus in order to use it. Each plugin has its own documentation page, which describes what the plugin does, what options are available, and what kind of data it collects. ## Using a plugin @@ -35,7 +35,7 @@ var image_trial = { } ``` -You can override any default parameter values by adding them into your trial object. Here's an exampe of overriding the default values for `trial_duration` and `post_trial_gap`: +You can override any default parameter values by adding them into your trial object. Here's an example of overriding the default values for `trial_duration` and `post_trial_gap`: ```javascript var image_trial = { diff --git a/docs/overview/progress-bar.md b/docs/overview/progress-bar.md index ef8efa6d..e427d8f9 100644 --- a/docs/overview/progress-bar.md +++ b/docs/overview/progress-bar.md @@ -1,6 +1,6 @@ # Automatic Progress Bar -jsPsych can show a progress bar at the top of the experiment page indicating the subject's overall completion progress. The progress bar is rendered outside the jsPsych display element, and it requires the `jspsych.css` file to be loaded on the page. As of version 6.0, the progress bar looks like this: +jsPsych can show a progress bar at the top of the experiment page indicating the participant's overall completion progress. The progress bar is rendered outside the jsPsych display element, and it requires the `jspsych.css` file to be loaded on the page. As of version 6.0, the progress bar looks like this: ![Progressbar Screenshot](../img/progress_bar.png) @@ -12,7 +12,7 @@ var jsPsych = initJsPsych({ }); ``` -The progress bar updates after every node on the top-level timeline updates. This avoids distracting updates in the middle of trials that are composed of multiple plugins, or confusing updates due to looping or conditional structures that may or may not execute depending on the actions of the subject. This also allows some flexibility for the programmer; by nesting timelines in a deliberate manner, the timing of progress bar updates can be controlled. +The progress bar updates after every node on the top-level timeline updates. This avoids distracting updates in the middle of trials that are composed of multiple plugins, or confusing updates due to looping or conditional structures that may or may not execute depending on the actions of the participant. This also allows some flexibility for the programmer; by nesting timelines in a deliberate manner, the timing of progress bar updates can be controlled. ## Manual Control diff --git a/docs/plugins/animation.md b/docs/plugins/animation.md index c83fe5c8..e8fa52d0 100644 --- a/docs/plugins/animation.md +++ b/docs/plugins/animation.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-animation/CHANGELOG.md). -This plugin displays a sequence of images at a fixed frame rate. The sequence can be looped a specified number of times. The subject is free to respond at any point during the animation, and the time of the response is recorded. +This plugin displays a sequence of images at a fixed frame rate. The sequence can be looped a specified number of times. The participant is free to respond at any point during the animation, and the time of the response is recorded. ## Parameters @@ -11,11 +11,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# Parameter | Type | Default Value | Description ----------|------|---------------|------------ stimuli | array | *undefined* | Each element of the array is a path to an image file. -frame_time | numeric | 250 | How long to display each image (in milliseconds). -frame_isi | numeric | 0 | If greater than 0, then a gap will be shown between each image in the sequence. This parameter specifies the length of the gap. +frame_time | numeric | 250 | How long to display each image in milliseconds. +frame_isi | numeric | 0 | If greater than 0, then a gap will be shown between each image in the sequence. This parameter specifies the length of the gap in milliseconds. sequence_reps | numeric | 1 | How many times to show the entire sequence. There will be no gap (other than the gap specified by `frame_isi`) between repetitions. -choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key(s) to press). +choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key(s) to press). render_on_canvas | boolean | true | If true, the images will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive images in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. ## Data Generated @@ -25,7 +25,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ animation_sequence | array | An array, where each element is an object that represents a stimulus in the animation sequence. Each object has a `stimulus` property, which is the image that was displayed, and a `time` property, which is the time in ms, measured from when the sequence began, that the stimulus was displayed. The array will be encoded in JSON format when data is saved using either the `.json()` or `.csv()` functions. -response | array | An array, where each element is an object representing a response given by the subject. Each object has a `stimulus` property, indicating which image was displayed when the key was pressed, an `rt` property, indicating the time of the key press relative to the start of the animation, and a `key_press` property, indicating which key was pressed. The array will be encoded in JSON format when data is saved using either the `.json()` or `.csv()` functions. +response | array | An array, where each element is an object representing a response given by the participant. Each object has a `stimulus` property, indicating which image was displayed when the key was pressed, an `rt` property, indicating the time of the key press relative to the start of the animation, and a `key_press` property, indicating which key was pressed. The array will be encoded in JSON format when data is saved using either the `.json()` or `.csv()` functions. ## Install diff --git a/docs/plugins/audio-button-response.md b/docs/plugins/audio-button-response.md index 3a772893..d09c953f 100644 --- a/docs/plugins/audio-button-response.md +++ b/docs/plugins/audio-button-response.md @@ -8,7 +8,7 @@ If the browser supports it, audio files are played using the WebAudio API. This Audio files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the audio stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the audio. -The trial can end when the subject responds, when the audio file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a button response from being made before the audio has finished playing. +The trial can end when the participant responds, when the audio file has finished playing, or if the participant has failed to respond within a fixed length of time. You can also prevent a button response from being made before the audio has finished playing. ## Parameters @@ -19,11 +19,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | stimulus | audio file | *undefined* | Path to audio file to be played. | | choices | array of strings | *undefined* | Labels for the buttons. Each different string in the array will generate a different button. | | button_html | HTML string | `''` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. | | margin_vertical | string | '0px' | Vertical margin of the button(s). | | margin_horizontal | string | '8px' | Horizontal margin of the button(s). | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | | trial_ends_after_audio | boolean | false | If true, then the trial will end as soon as the audio file finishes playing. | | response_allowed_while_playing | boolean | true | If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before the button choices are enabled and a response is accepted. Once the audio has played all the way through, the buttons are enabled and a response is allowed (including while the audio is being re-played via on-screen playback controls). | @@ -33,8 +33,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | -------------- | ------- | ---------------------------------------- | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first began playing until the subject's response. | -| response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first began playing until the participant's response. | +| response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. | ## Simulation Mode @@ -67,7 +67,7 @@ import audioButtonResponse from '@jspsych/plugin-audio-button-response'; ## Examples -???+ example "Displaying question until subject gives a response" +???+ example "Displaying question until participant gives a response" === "Code" ```javascript var trial = { diff --git a/docs/plugins/audio-keyboard-response.md b/docs/plugins/audio-keyboard-response.md index 38e6b062..67b4b3a1 100644 --- a/docs/plugins/audio-keyboard-response.md +++ b/docs/plugins/audio-keyboard-response.md @@ -8,7 +8,7 @@ If the browser supports it, audio files are played using the WebAudio API. This Audio files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the audio stimulus, then you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the audio. -The trial can end when the subject responds, when the audio file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the audio has finished playing. +The trial can end when the participant responds, when the audio file has finished playing, or if the participant has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the audio has finished playing. ## Parameters @@ -17,10 +17,10 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | ------------------------------ | ---------------- | ------------------ | ---------------------------------------- | | stimulus | audio file | undefined | Path to audio file to be played. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use set this parameter to `false` to force the subject to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | | trial_ends_after_audio | boolean | false | If true, then the trial will end as soon as the audio file finishes playing. | | response_allowed_while_playing | boolean | true | If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before a keyboard response is accepted. Once the audio has played all the way through, a valid keyboard response is allowed (including while the audio is being re-played via on-screen playback controls). | @@ -30,8 +30,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| response | string | Indicates which key the subject pressed. If no key was pressed before the trial ended, then the value will be `null`. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first began playing until the subject made a key response. If no key was pressed before the trial ended, then the value will be `null`. | +| response | string | Indicates which key the participant pressed. If no key was pressed before the trial ended, then the value will be `null`. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first began playing until the participant made a key response. If no key was pressed before the trial ended, then the value will be `null`. | | stimulus | string | Path to the audio file that played during the trial. | ## Simulation Mode @@ -65,7 +65,7 @@ import audioKeyboardResponse from '@jspsych/plugin-audio-keyboard-response'; ## Examples -???+ example "Trial continues until subject gives a response" +???+ example "Trial continues until participant gives a response" === "Code" ```javascript var trial = { diff --git a/docs/plugins/audio-slider-response.md b/docs/plugins/audio-slider-response.md index 6dce9f62..20a2115d 100644 --- a/docs/plugins/audio-slider-response.md +++ b/docs/plugins/audio-slider-response.md @@ -2,13 +2,13 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-audio-slider-response/CHANGELOG.md). -This plugin plays an audio file and allows the subject to respond by dragging a slider. +This plugin plays an audio file and allows the participant to respond by dragging a slider. If the browser supports it, audio files are played using the WebAudio API. This allows for reasonably precise timing of the playback. The timing of responses generated is measured against the WebAudio specific clock, improving the measurement of response times. If the browser does not support the WebAudio API, then the audio file is played with HTML5 audio. Audio files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the audio stimulus, then you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the audio. -The trial can end when the subject responds, or if the subject has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the audio has finished playing. +The trial can end when the participant responds, or if the participant has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the audio has finished playing. ## Parameters @@ -24,10 +24,10 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | slider_start | integer | 50 | Sets the starting value of the slider | | step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change. | | slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display. | -| require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | +| require_movement | boolean | false | If true, the participant must move the slider before clicking the continue button. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to listen to the stimulus for a fixed amount of time, even if they respond before the time is complete. | | response_allowed_while_playing | boolean | true | If true, then responses are allowed while the audio is playing. If false, then the audio must finish playing before the slider is enabled and the trial can end via the next button click. Once the audio has played all the way through, the slider is enabled and a response is allowed (including while the audio is being re-played via on-screen playback controls). | ## Data Generated @@ -37,7 +37,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | ------------ | ------- | ---------------------------------------- | | response | numeric | The numeric value of the slider. | -| rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first began playing until the subject's response. | +| rt | numeric | The time in milliseconds for the participant to make a response. The time is measured from when the stimulus first began playing until the participant's response. | | stimulus | string | The path of the audio file that was played. | | slider_start | numeric | The starting value of the slider. | @@ -90,7 +90,7 @@ import audioSliderResponse from '@jspsych/plugin-audio-slider-response'; Open demo in new tab -???+ example "No response allowed until audio finishes; subject must interact with slider to continue" +???+ example "No response allowed until audio finishes; participant must interact with slider to continue" === "Code" ```javascript var trial = { diff --git a/docs/plugins/canvas-button-response.md b/docs/plugins/canvas-button-response.md index 64e9f1c6..b200a562 100644 --- a/docs/plugins/canvas-button-response.md +++ b/docs/plugins/canvas-button-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-button-response/CHANGELOG.md). -This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a button click response and response time. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. One or more button choices will be displayed under the canvas, and the button style can be customized using HTML formatting. +This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a button click response and response time. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. One or more button choices will be displayed under the canvas, and the button style can be customized using HTML formatting. ## Parameters @@ -14,12 +14,12 @@ stimulus | function | *undefined* | The function to draw on the canvas. This fun canvas_size | array | [500, 500] | Array that defines the size of the canvas element in pixels. First value is height, second value is width. choices | array of strings | [] | Labels for the buttons. Each different string in the array will generate a different button. button_html | HTML string | `''` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., what question to answer). -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., what question to answer). +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. margin_vertical | string | '0px' | Vertical margin of the button(s). margin_horizontal | string | '8px' | Horizontal margin of the button(s). -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. ## Data Generated @@ -27,8 +27,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. -response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. +response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter. diff --git a/docs/plugins/canvas-keyboard-response.md b/docs/plugins/canvas-keyboard-response.md index 6bd55306..8fab3efa 100644 --- a/docs/plugins/canvas-keyboard-response.md +++ b/docs/plugins/canvas-keyboard-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-keyboard-response/CHANGELOG.md). -This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and record a keyboard response. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. +This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and record a keyboard response. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. ## Parameters @@ -12,11 +12,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | ------------------- | ---------------- | ------------------ | ---------------------------------------- | | stimulus | function | *undefined* | The function to draw on the canvas. This function automatically takes a canvas element as its only argument, e.g. `function(c) {...}` or `function drawStim(c) {...}`, where `c` refers to the canvas element. Note that the stimulus function will still generally need to set the correct context itself, using a line like `let ctx = c.getContext("2d")`. | | canvas_size | array | [500, 500] | Array that defines the size of the canvas element in pixels. First value is height, second value is width. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | | stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | ## Data Generated @@ -24,8 +24,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter. diff --git a/docs/plugins/canvas-slider-response.md b/docs/plugins/canvas-slider-response.md index cbca7d5f..0a62d7ca 100644 --- a/docs/plugins/canvas-slider-response.md +++ b/docs/plugins/canvas-slider-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-canvas-slider-response/CHANGELOG.md). -This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and collect a response within a range of values, which is made by dragging a slider. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. +This plugin can be used to draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp) and collect a response within a range of values, which is made by dragging a slider. The canvas stimulus can be useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. ## Parameters @@ -19,11 +19,11 @@ max | integer | 100 | Sets the maximum value of the slider. slider_start | integer | 50 | Sets the starting value of the slider. step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change. slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display. -require_movement | boolean | false | If true, the subject must click the slider before clicking the continue button. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., what question to answer). +require_movement | boolean | false | If true, the participant must click the slider before clicking the continue button. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., what question to answer). stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. ## Data Generated @@ -32,7 +32,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | numeric | The numeric value of the slider. -rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. +rt | numeric | The time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. Note: the canvas stimulus is *not* included in the trial data because it is a function. Any stimulus information that should be saved in the trial data can be added via the `data` parameter. diff --git a/docs/plugins/categorize-animation.md b/docs/plugins/categorize-animation.md index 66ffe8a7..e43f14b4 100644 --- a/docs/plugins/categorize-animation.md +++ b/docs/plugins/categorize-animation.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-animation/CHANGELOG.md). -The categorize animation plugin shows a sequence of images at a specified frame rate. The subject responds by pressing a key. Feedback indicating the correctness of the response is given. +The categorize animation plugin shows a sequence of images at a specified frame rate. The participant responds by pressing a key. Feedback indicating the correctness of the response is given. ## Parameters @@ -11,15 +11,15 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | ------------------------------ | ---------------- | ------------------ | ---------------------------------------- | | stimuli | array | *undefined* | Each element of the array is a path to an image file. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | | key_answer | string | *undefined* | The key character indicating the correct response. | | text_answer | string | "" | A text label that describes the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters. | | correct_text | string | "Correct." | String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below). | | incorrect_text | string | "Wrong." | String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below). | | frame_time | numeric | 500 | How long to display each image (in milliseconds). | | sequence_reps | numeric | 1 | How many times to show the entire sequence. | -| allow_response_before_complete | boolean | false | If true, the subject can respond before the animation sequence finishes. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus or the end of the animation depending on the allow_response_before_complete parameter. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| allow_response_before_complete | boolean | false | If true, the participant can respond before the animation sequence finishes. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus or the end of the animation depending on the allow_response_before_complete parameter. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | | feedback_duration | numeric | 2000 | How long to show the feedback (milliseconds). | | render_on_canvas | boolean | true | If true, the images will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive images in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. | @@ -30,9 +30,9 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | | stimulus | array | Array of stimuli displayed in the trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant got the correct answer, `false` otherwise. | ## Install diff --git a/docs/plugins/categorize-html.md b/docs/plugins/categorize-html.md index 18fe2847..9f7931c1 100644 --- a/docs/plugins/categorize-html.md +++ b/docs/plugins/categorize-html.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-html/CHANGELOG.md). -The categorize html plugin shows an HTML object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given. +The categorize html plugin shows an HTML object on the screen. The participant responds by pressing a key. Feedback indicating the correctness of the response is given. ## Parameters @@ -11,13 +11,13 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | -------------------------- | ---------------- | ------------------------ | ---------------------------------------- | | stimulus | html string | *undefined* | The HTML stimulus to display. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | | key_answer | string | *undefined* | The key character indicating the correct response. | | text_answer | string | "" | A label that is associated with the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters. | | correct_text | string | "Correct." | String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the `%ANS%` string (see example below). | | incorrect_text | string | "Wrong." | String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the `%ANS%` string (see example below). | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| force_correct_button_press | boolean | false | If set to true, then the subject must press the correct response key after feedback is given in order to advance to the next trial. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| force_correct_button_press | boolean | false | If set to true, then the participant must press the correct response key after feedback is given in order to advance to the next trial. | | show_stim_with_feedback | boolean | true | If set to true, then the stimulus will be shown during feedback. If false, then only the text feedback will display during feedback. | | show_feedback_on_timeout | boolean | false | If true, then category feedback will be displayed for an incorrect response after a timeout (trial_duration is exceeded). If false, then a timeout message will be shown. | | timeout_message | string | "Please respond faster." | The message to show on a timeout non-response. | @@ -31,10 +31,10 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | string | Either the path to the image file or the string containing the HTML formatted content that the subject saw on this trial. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +| stimulus | string | Either the path to the image file or the string containing the HTML formatted content that the participant saw on this trial. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant got the correct answer, `false` otherwise. | ## Install diff --git a/docs/plugins/categorize-image.md b/docs/plugins/categorize-image.md index 2e13d107..d9dd95f4 100644 --- a/docs/plugins/categorize-image.md +++ b/docs/plugins/categorize-image.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-categorize-image/CHANGELOG.md). -The categorize image plugin shows an image object on the screen. The subject responds by pressing a key. Feedback indicating the correctness of the response is given. +The categorize image plugin shows an image object on the screen. The participant responds by pressing a key. Feedback indicating the correctness of the response is given. ## Parameters @@ -12,12 +12,12 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | -------------------------- | ---------------- | ------------------------ | ---------------------------------------- | | stimulus | string | *undefined* | The path to the image file. | | key_answer | string | *undefined* | The key character indicating the correct response. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | | text_answer | string | "" | A label that is associated with the correct answer. Used in conjunction with the `correct_text` and `incorrect_text` parameters. | | correct_text | string | "Correct." | String to show when the correct answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below). | | incorrect_text | string | "Wrong." | String to show when the wrong answer is given. Can contain HTML formatting. The special string `%ANS%` can be used within the string. If present, the plugin will put the `text_answer` for the trial in place of the %ANS% string (see example below). | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| force_correct_button_press | boolean | false | If set to true, then the subject must press the correct response key after feedback is given in order to advance to the next trial. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| force_correct_button_press | boolean | false | If set to true, then the participant must press the correct response key after feedback is given in order to advance to the next trial. | | show_stim_with_feedback | boolean | true | If set to true, then the stimulus will be shown during feedback. If false, then only the text feedback will display during feedback. | | show_feedback_on_timeout | boolean | false | If true, then category feedback will be displayed for an incorrect response after a timeout (trial_duration is exceeded). If false, then a timeout message will be shown. | | timeout_message | string | "Please respond faster." | The message to show on a timeout non-response. | @@ -32,10 +32,10 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | string | Either the path to the image file or the string containing the HTML formatted content that the subject saw on this trial. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject got the correct answer, `false` otherwise. | +| stimulus | string | Either the path to the image file or the string containing the HTML formatted content that the participant saw on this trial. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant got the correct answer, `false` otherwise. | ## Install diff --git a/docs/plugins/external-html.md b/docs/plugins/external-html.md index 496d11dd..aa2503c6 100644 --- a/docs/plugins/external-html.md +++ b/docs/plugins/external-html.md @@ -11,9 +11,9 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | -------------- | -------- | ---------------------------- | ---------------------------------------- | | url | string | *undefined* | The URL of the page to display. | -| cont_key | string | null | The key character the subject can use to advance to the next trial. If left as null, then the subject will not be able to advance trials using the keyboard. | +| cont_key | string | null | The key character the participant can use to advance to the next trial. If left as null, then the participant will not be able to advance trials using the keyboard. | | cont_btn | string | null | The ID of a clickable element on the page. When the element is clicked, the trial will advance. | -| check_fn | function | `function(){ return true; }` | This function is called with the jsPsych `display_element` as the only argument when the subject attempts to advance the trial. The trial will only advance if the function return `true`. This can be used to verify that the subject has correctly filled out a form before continuing, for example. | +| check_fn | function | `function(){ return true; }` | This function is called with the jsPsych `display_element` as the only argument when the participant attempts to advance the trial. The trial will only advance if the function return `true`. This can be used to verify that the participant has correctly filled out a form before continuing, for example. | | force_refresh | boolean | false | If `true`, then the plugin will avoid using the cached version of the HTML page to load if one exists. | | execute_script | boolean | false | If `true`, then scripts on the remote page will be executed. | @@ -24,7 +24,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | ---- | ------- | ---------------------------------------- | | url | string | The URL of the page. | -| rt | numeric | The response time in milliseconds for the subject to finish the trial. | +| rt | numeric | The response time in milliseconds for the participant to finish the trial. | ## Simulation Mode @@ -76,7 +76,7 @@ import externalHtml from '@jspsych/plugin-external-html'; ???+ example "jsPsych code to load above page." === "Code" ```javascript - // sample function that might be used to check if a subject has given + // sample function that might be used to check if a participant has given // consent to participate. var check_consent = function(elem) { if (document.getElementById('consent_checkbox').checked) { diff --git a/docs/plugins/html-button-response.md b/docs/plugins/html-button-response.md index b218147b..2bfb7a11 100644 --- a/docs/plugins/html-button-response.md +++ b/docs/plugins/html-button-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-button-response/CHANGELOG.md). -This plugin displays HTML content and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting. +This plugin displays HTML content and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting. ## Parameters @@ -13,12 +13,12 @@ Parameter | Type | Default Value | Description stimulus | HTML string | undefined | The HTML content to be displayed. choices | array of strings | [] | Labels for the buttons. Each different string in the array will generate a different button. button_html | HTML string | `''` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. margin_vertical | string | '0px' | Vertical margin of the button(s). margin_horizontal | string | '8px' | Horizontal margin of the button(s). -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. ## Data Generated @@ -26,8 +26,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. -response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. +response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. stimulus | string | The HTML content that was displayed on the screen. ## Install @@ -55,7 +55,7 @@ import htmlButtonResponse from '@jspsych/plugin-html-button-response'; ## Examples -???+ example "Displaying question until subject gives a response" +???+ example "Displaying question until participant gives a response" === "Code" ```javascript var trial = { diff --git a/docs/plugins/html-keyboard-response.md b/docs/plugins/html-keyboard-response.md index f2c0d47c..bb8b0173 100644 --- a/docs/plugins/html-keyboard-response.md +++ b/docs/plugins/html-keyboard-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-keyboard-response/CHANGELOG.md). -This plugin displays HTML content and records responses generated with the keyboard.The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. +This plugin displays HTML content and records responses generated with the keyboard.The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. ## Parameters @@ -12,11 +12,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | ------------------- | ---------------- | ------------------ | ---------------------------------------- | | stimulus | HTML string | *undefined* | The string to be displayed. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | | stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | ## Data Generated @@ -24,8 +24,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | | stimulus | string | The HTML content that was displayed on the screen. | ## Install @@ -53,7 +53,7 @@ import htmlKeyboardResponse from '@jspsych/plugin-html-keyboard-response'; ## Examples -???+ example "Displaying trial until subject gives a response" +???+ example "Displaying trial until participant gives a response" === "Code" ```javascript var trial = { diff --git a/docs/plugins/html-slider-response.md b/docs/plugins/html-slider-response.md index f0d13735..b2b3aa1a 100644 --- a/docs/plugins/html-slider-response.md +++ b/docs/plugins/html-slider-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-html-slider-response/CHANGELOG.md). -This plugin displays HTML content and allows the subject to respond by dragging a slider. +This plugin displays HTML content and allows the participant to respond by dragging a slider. ## Parameters @@ -18,11 +18,11 @@ max | integer | 100 | Sets the maximum value of the slider. slider_start | integer | 50 | Sets the starting value of the slider step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change. slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display. -require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). +require_movement | boolean | false | If true, the participant must move the slider before clicking the continue button. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). stimulus_duration | numeric | null | How long to display the stimulus in milliseconds. The visibility CSS property of the stimulus will be set to `hidden` after this time has elapsed. If this is null, then the stimulus will remain visible until the trial ends. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. ## Data Generated @@ -31,7 +31,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | numeric | The numeric value of the slider. -rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. +rt | numeric | The time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. stimulus | string | The HTML content that was displayed on the screen. slider_start | numeric | The starting value of the slider. @@ -60,7 +60,7 @@ import htmlSliderResponse from '@jspsych/plugin-html-slider-response'; ## Examples -???+ example "Displaying question until subject move the slider" +???+ example "Displaying question until participant moves the slider" === "Code" ```javascript diff --git a/docs/plugins/iat-html.md b/docs/plugins/iat-html.md index 85e7cd66..8bd60479 100644 --- a/docs/plugins/iat-html.md +++ b/docs/plugins/iat-html.md @@ -20,9 +20,9 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | left_category_label | string | ['left'] | An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the left side of the page. | | right_category_label | string | ['right'] | An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the right side of the page. | | stim_key_association | string | *undefined* | Either 'left' or 'right'. This indicates whether the stimulus is associated with the key press and category on the left or right side of the page (`left_category_key` or `right_category_key`). | -| key_to_move_forward | array of strings | "ALL_KEYS" | This array contains the characters the subject is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| key_to_move_forward | array of strings | "ALL_KEYS" | This array contains the characters the participant is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | ## Data Generated @@ -30,9 +30,9 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | string | Either the path to the image file or the string containing the HTML-formatted content that the subject saw on this trial. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| stimulus | string | Either the path to the image file or the string containing the HTML-formatted content that the participant saw on this trial. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | | correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given stimulus. | ## Install diff --git a/docs/plugins/iat-image.md b/docs/plugins/iat-image.md index 92d47ff9..9cf10106 100644 --- a/docs/plugins/iat-image.md +++ b/docs/plugins/iat-image.md @@ -20,9 +20,9 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | left_category_label | string | ['left'] | An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the left side of the page. | | right_category_label | string | ['right'] | An array that contains the words/labels associated with a certain stimulus. The labels are aligned to the right side of the page. | | stim_key_association | string | 'undefined' | Either 'left' or 'right'. This indicates whether the stimulus is associated with the key press and category on the left or right side of the page (`left_category_key` or `right_category_key`). | -| key_to_move_forward | array of characters | "ALL_KEYS" | This array contains the characters the subject is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| key_to_move_forward | array of characters | "ALL_KEYS" | This array contains the characters the participant is allowed to press to move on to the next trial if their key press was incorrect and feedback was displayed. Can also have 'other key' as an option which will only allow the user to select the right key to move forward. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as `null` for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can use this parameter to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | ## Data Generated @@ -30,9 +30,9 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | string | Either the path to the image file or the string containing the HTML-formatted content that the subject saw on this trial. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| stimulus | string | Either the path to the image file or the string containing the HTML-formatted content that the participant saw on this trial. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | | correct | boolean | Boolean indicating whether the user's key press was correct or incorrect for the given image. | ## Install diff --git a/docs/plugins/image-button-response.md b/docs/plugins/image-button-response.md index f9977ef2..5cf97be6 100644 --- a/docs/plugins/image-button-response.md +++ b/docs/plugins/image-button-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-button-response/CHANGELOG.md). -This plugin displays an image and records responses generated with a button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting. +This plugin displays an image and records responses generated with a button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. The button itself can be customized using HTML formatting. Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images. @@ -18,12 +18,12 @@ stimulus_width | integer | null | Set the width of the image in pixels. If left maintain_aspect_ratio | boolean | true | If setting *only* the width or *only* the height and this parameter is true, then the other dimension will be scaled to maintain the image's aspect ratio. choices | array of strings | [] | Labels for the buttons. Each different string in the array will generate a different button. button_html | HTML string | `''` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). -stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the subject makes a response. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). +stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the participant makes a response. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, the trial will wait for a response indefinitely. margin_vertical | string | '0px' | Vertical margin of the button(s). margin_horizontal | string | '8px' | Horizontal margin of the button(s). -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. render_on_canvas | boolean | true | If true, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images. ## Data Generated @@ -32,8 +32,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. -response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. +response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. stimulus | string | The path of the image that was displayed. ## Install @@ -61,7 +61,7 @@ import imageButtonResponse from '@jspsych/plugin-image-button-response'; ## Examples -???+ example "Displaying question until subject gives a response" +???+ example "Displaying question until participant gives a response" === "Code" ```javascript diff --git a/docs/plugins/image-keyboard-response.md b/docs/plugins/image-keyboard-response.md index 94387472..f3e3cef1 100644 --- a/docs/plugins/image-keyboard-response.md +++ b/docs/plugins/image-keyboard-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-keyboard-response/CHANGELOG.md). -This plugin displays and image and records responses generated with the keyboard. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the subject has failed to respond within a fixed length of time. +This plugin displays and image and records responses generated with the keyboard. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically if the participant has failed to respond within a fixed length of time. Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images. @@ -16,11 +16,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | stimulus_height | integer | null | Set the height of the image in pixels. If left null (no value specified), then the image will display at its natural height. | | stimulus_width | integer | null | Set the width of the image in pixels. If left null (no value specified), then the image will display at its natural width. | | maintain_aspect_ratio | boolean | true | If setting *only* the width or *only* the height and this parameter is true, then the other dimension will be scaled to maintain the image's aspect ratio. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | -| stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is `null`, then the stimulus will be shown until the subject makes a response. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | +| stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is `null`, then the stimulus will be shown until the participant makes a response. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is `null`, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | | render_on_canvas | boolean | true | If `true`, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If `false`, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images. | ## Data Generated @@ -29,8 +29,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | | stimulus | string | The path of the image that was displayed. | ## Install @@ -58,7 +58,7 @@ import imageKeyboardResponse from '@jspsych/plugin-image-keyboard-response'; ## Examples -???+ example "Displaying trial until subject gives a response" +???+ example "Displaying trial until participant gives a response" === "Code" ```javascript var trial = { diff --git a/docs/plugins/image-slider-response.md b/docs/plugins/image-slider-response.md index e221b0aa..d5662491 100644 --- a/docs/plugins/image-slider-response.md +++ b/docs/plugins/image-slider-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-image-slider-response/CHANGELOG.md). -This plugin displays and image and allows the subject to respond by dragging a slider. +This plugin displays and image and allows the participant to respond by dragging a slider. Image files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the image stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the images. @@ -23,11 +23,11 @@ max | integer | 100 | Sets the maximum value of the slider slider_start | integer | 50 | Sets the starting value of the slider step | integer | 1 | Sets the step of the slider slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display. -require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). -stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the subject makes a response. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +require_movement | boolean | false | If true, the participant must move the slider before clicking the continue button. +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). +stimulus_duration | numeric | null | How long to show the stimulus for in milliseconds. If the value is null, then the stimulus will be shown until the participant makes a response. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. render_on_canvas | boolean | true | If true, the image will be drawn onto a canvas element. This prevents a blank screen (white flash) between consecutive image trials in some browsers, like Firefox and Edge. If false, the image will be shown via an img element, as in previous versions of jsPsych. If the stimulus is an **animated gif**, you must set this parameter to false, because the canvas rendering method will only present static images. ## Data Generated @@ -37,7 +37,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | numeric | The numeric value of the slider. -rt | numeric | The time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. +rt | numeric | The time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. stimulus | string | The path of the image that was displayed. slider_start | numeric | The starting value of the slider. @@ -66,7 +66,7 @@ import imageSliderResponse from '@jspsych/plugin-image-slider-response'; ## Examples -???+ example "Displaying trial until subject gives a response" +???+ example "Displaying trial until participant gives a response" === "Code" ```javascript diff --git a/docs/plugins/instructions.md b/docs/plugins/instructions.md index 98909dbb..686cf4ec 100644 --- a/docs/plugins/instructions.md +++ b/docs/plugins/instructions.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-instructions/CHANGELOG.md). -This plugin is for showing instructions to the subject. It allows subjects to navigate through multiple pages of instructions at their own pace, recording how long the subject spends on each page. Navigation can be done using the mouse or keyboard. Subjects can be allowed to navigate forwards and backwards through pages, if desired. +This plugin is for showing instructions to the participant. It allows participants to navigate through multiple pages of instructions at their own pace, recording how long the participant spends on each page. Navigation can be done using the mouse or keyboard. participants can be allowed to navigate forwards and backwards through pages, if desired. ## Parameters @@ -11,11 +11,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | --------------------- | ------- | ------------- | ---------------------------------------- | | pages | array | *undefined* | Each element of the array is the content for a single page. Each page should be an HTML-formatted string. | -| key_forward | string | 'ArrowRight' | This is the key that the subject can press in order to advance to the next page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`). | -| key_backward | string | 'ArrowLeft' | This is the key that the subject can press to return to the previous page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`). | -| allow_backward | boolean | true | If true, the subject can return to previous pages of the instructions. If false, they may only advace to the next page. | -| allow_keys | boolean | true | If `true`, the subject can use keyboard keys to navigate the pages. If `false`, they may not. | -| show_clickable_nav | boolean | false | If true, then a `Previous` and `Next` button will be displayed beneath the instructions. Subjects can click the buttons to navigate. | +| key_forward | string | 'ArrowRight' | This is the key that the participant can press in order to advance to the next page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`). | +| key_backward | string | 'ArrowLeft' | This is the key that the participant can press to return to the previous page. This key should be specified as a string (e.g., `'a'`, `'ArrowLeft'`, `' '`, `'Enter'`). | +| allow_backward | boolean | true | If true, the participant can return to previous pages of the instructions. If false, they may only advace to the next page. | +| allow_keys | boolean | true | If `true`, the participant can use keyboard keys to navigate the pages. If `false`, they may not. | +| show_clickable_nav | boolean | false | If true, then a `Previous` and `Next` button will be displayed beneath the instructions. participants can click the buttons to navigate. | | button_label_previous | string | 'Previous' | The text that appears on the button to go backwards. | | button_label_next | string | 'Next' | The text that appears on the button to go forwards. | | show_page_number | boolean | false | If true, and clickable navigation is enabled, then Page x/y will be shown between the nav buttons. | @@ -27,8 +27,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | ------------ | ----------- | ---------------------------------------- | -| view_history | array | An array containing the order of pages the subject viewed (including when the subject returned to previous pages) and the time spent viewing each page. Each object in the array represents a single page view, and contains keys called `page_index` (the page number, starting with 0) and `viewing_time` (duration of the page view). This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| rt | numeric | The response time in milliseconds for the subject to view all of the pages. | +| view_history | array | An array containing the order of pages the participant viewed (including when the participant returned to previous pages) and the time spent viewing each page. Each object in the array represents a single page view, and contains keys called `page_index` (the page number, starting with 0) and `viewing_time` (duration of the page view). This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | +| rt | numeric | The response time in milliseconds for the participant to view all of the pages. | ## Install diff --git a/docs/plugins/list-of-plugins.md b/docs/plugins/list-of-plugins.md index 22e56d70..7153757a 100644 --- a/docs/plugins/list-of-plugins.md +++ b/docs/plugins/list-of-plugins.md @@ -8,55 +8,55 @@ For an overview of what plugins are and how they work, see our [plugins overview Plugin | Description ------ | ----------- -[animation](animation.md) | Shows a sequence of images at a specified frame rate. Records key presses (including timing information) made by the subject while they are viewing the animation. -[audio‑button‑response](audio-button-response.md) | Play an audio file and allow the subject to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. -[audio‑keyboard‑response](audio-keyboard-response.md) | Play an audio file and allow the subject to respond by pressing a key. -[audio‑slider‑response](audio-slider-response.md) | Play an audio file and allow the subject to respond by moving a slider to indicate a value. +[animation](animation.md) | Shows a sequence of images at a specified frame rate. Records key presses (including timing information) made by the participant while they are viewing the animation. +[audio‑button‑response](audio-button-response.md) | Play an audio file and allow the participant to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. +[audio‑keyboard‑response](audio-keyboard-response.md) | Play an audio file and allow the participant to respond by pressing a key. +[audio‑slider‑response](audio-slider-response.md) | Play an audio file and allow the participant to respond by moving a slider to indicate a value. [browser‑check](browser-check.md) | Measures various features of the participant's browser and runs an inclusion check to see if the browser meets a custom set of criteria for running the study. -[call‑function](call-function.md) | Executes an arbitrary function call. Doesn't display anything to the subject, and the subject is usually unaware that this plugin has even executed. It's useful for performing tasks at specified times in the experiment, such as saving data. +[call‑function](call-function.md) | Executes an arbitrary function call. Doesn't display anything to the participant, and the participant is usually unaware that this plugin has even executed. It's useful for performing tasks at specified times in the experiment, such as saving data. [canvas‑button‑response](canvas-button-response.md) | Draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a button click response. Useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). [canvas‑keyboard‑response](canvas-keyboard-response) | Draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and record a key press response. Useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). -[canvas‑slider‑response](canvas-slider-response.md) | Draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and ask the subject to respond by moving a slider to indicate a value. Useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). -[categorize‑animation](categorize-animation.md) | The subject responds to an animation and can be given feedback about their response. -[categorize‑html](categorize-html.md) | The subject responds to an HTML-formatted stimulus using the keyboard and can be given feedback about the correctness of their response. -[categorize‑image](categorize-image.md) | The subject responds to an image using the keyboard and can be given feedback about the correctness of their response. +[canvas‑slider‑response](canvas-slider-response.md) | Draw a stimulus on a [HTML canvas element](https://www.w3schools.com/html/html5_canvas.asp), and ask the participant to respond by moving a slider to indicate a value. Useful for displaying dynamic, parametrically-defined graphics, and for controlling the positioning of multiple graphical elements (shapes, text, images). +[categorize‑animation](categorize-animation.md) | The participant responds to an animation and can be given feedback about their response. +[categorize‑html](categorize-html.md) | The participant responds to an HTML-formatted stimulus using the keyboard and can be given feedback about the correctness of their response. +[categorize‑image](categorize-image.md) | The participant responds to an image using the keyboard and can be given feedback about the correctness of their response. [cloze](cloze) | Plugin for displaying a cloze test and checking participants answers against a correct solution. -[external‑html](external-html.md) | Displays an external HTML page (such as a consent form) and lets the subject respond by clicking a button or pressing a key. Plugin can validate their response, which is useful for making sure that a subject has granted consent before starting the experiment. -[free‑sort](free-sort.md) | Displays a set of images on the screen in random locations. Subjects can click and drag the images to move them around the screen. Records all the moves made by the subject, so the sequence of moves can be recovered from the data. +[external‑html](external-html.md) | Displays an external HTML page (such as a consent form) and lets the participant respond by clicking a button or pressing a key. Plugin can validate their response, which is useful for making sure that a participant has granted consent before starting the experiment. +[free‑sort](free-sort.md) | Displays a set of images on the screen in random locations. participants can click and drag the images to move them around the screen. Records all the moves made by the participant, so the sequence of moves can be recovered from the data. [fullscreen](fullscreen.md) | Toggles the experiment in and out of fullscreen mode. [html‑audio‑response](html-audio-response.md) | Display an HTML-formatted stimulus and records an audio response via a microphone. -[html‑button‑response](html-button-response.md) | Display an HTML-formatted stimulus and allow the subject to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. -[html‑keyboard‑response](html-keyboard-response.md) | Display an HTML-formatted stimulus and allow the subject to respond by pressing a key. -[html‑slider‑response](html-slider-response.md) | Display an HTML-formatted stimulus and allow the subject to respond by moving a slider to indicate a value. +[html‑button‑response](html-button-response.md) | Display an HTML-formatted stimulus and allow the participant to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. +[html‑keyboard‑response](html-keyboard-response.md) | Display an HTML-formatted stimulus and allow the participant to respond by pressing a key. +[html‑slider‑response](html-slider-response.md) | Display an HTML-formatted stimulus and allow the participant to respond by moving a slider to indicate a value. [html‑video‑response](html-video-response.md) | Display an HTML-formatted stimulus and records video data via a webcam. [iat‑html](iat-html.md) | The implicit association task, using HTML-formatted stimuli. [iat‑image](iat-image.md) | The implicit association task, using images as stimuli. -[image‑button‑response](image-button-response.md) | Display an image and allow the subject to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. -[image‑keyboard‑response](image-keyboard-response.md) | Display an image and allow the subject to respond by pressing a key. -[image‑slider‑response](image-slider-response.md) | Display an image and allow the subject to respond by moving a slider to indicate a value. -[initialize‑camera](initialize-camera.md) | Request permission to use the subject's camera to record video and allows the subject to choose which camera to use if multiple devices are enabled. Also allows setting the mime type of the recorded video. -[initialize‑microphone](initialize-microphone.md) | Request permission to use the subject's microphone to record audio and allows the subject to choose which microphone to use if multiple devices are enabled. -[instructions](instructions.md) | For displaying instructions to the subject. Allows the subject to navigate between pages of instructions using keys or buttons. +[image‑button‑response](image-button-response.md) | Display an image and allow the participant to respond by choosing a button to click. The button can be customized extensively, e.g., using images in place of standard buttons. +[image‑keyboard‑response](image-keyboard-response.md) | Display an image and allow the participant to respond by pressing a key. +[image‑slider‑response](image-slider-response.md) | Display an image and allow the participant to respond by moving a slider to indicate a value. +[initialize‑camera](initialize-camera.md) | Request permission to use the participant's camera to record video and allows the participant to choose which camera to use if multiple devices are enabled. Also allows setting the mime type of the recorded video. +[initialize‑microphone](initialize-microphone.md) | Request permission to use the participant's microphone to record audio and allows the participant to choose which microphone to use if multiple devices are enabled. +[instructions](instructions.md) | For displaying instructions to the participant. Allows the participant to navigate between pages of instructions using keys or buttons. [maxdiff](maxdiff.md) | Displays rows of alternatives to be selected for two mutually-exclusive categories, typically as 'most' or 'least' on a particular criteria (e.g. importance, preference, similarity). The participant responds by selecting one radio button corresponding to an alternative in both the left and right response columns. [mirror‑camera](mirror-camera.md) | Shows a live feed of the participant's camera on the screen. [preload](preload.md) | This plugin loads images, audio, and video files into the browser's memory before they are needed in the experiment, in order to improve stimulus and response timing, and to avoid disrupting the flow of the experiment. -[reconstruction](reconstruction.md) | The subject interacts with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time. +[reconstruction](reconstruction.md) | The participant interacts with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time. [resize](resize.md) | Calibrate the display so that materials display with a known physical size. -[same‑different‑html](same-different-html.md) | A same-different judgment task. An HTML-formatted stimulus is shown, followed by a brief gap, and then another stimulus is shown. The subject indicates whether the stimuli are the same or different. -[same‑different‑image](same-different-image.md) | A same-different judgment task. An image is shown, followed by a brief gap, and then another stimulus is shown. The subject indicates whether the stimuli are the same or different. -[serial‑reaction‑time](serial-reaction-time.md) | A set of boxes are displayed on the screen and one of them changes color. The subject presses a key that corresponds to the different color box as fast as possible. -[serial‑reaction‑time‑mouse](serial-reaction-time-mouse.md) | A set of boxes are displayed on the screen and one of them changes color. The subjects clicks the box that changed color as fast as possible. +[same‑different‑html](same-different-html.md) | A same-different judgment task. An HTML-formatted stimulus is shown, followed by a brief gap, and then another stimulus is shown. The participant indicates whether the stimuli are the same or different. +[same‑different‑image](same-different-image.md) | A same-different judgment task. An image is shown, followed by a brief gap, and then another stimulus is shown. The participant indicates whether the stimuli are the same or different. +[serial‑reaction‑time](serial-reaction-time.md) | A set of boxes are displayed on the screen and one of them changes color. The participant presses a key that corresponds to the different color box as fast as possible. +[serial‑reaction‑time‑mouse](serial-reaction-time-mouse.md) | A set of boxes are displayed on the screen and one of them changes color. The participants clicks the box that changed color as fast as possible. [sketchpad](sketchpad.md) | Creates an interactive canvas that the participant can draw on using their mouse or touchscreen. [survey‑html‑form](survey-html-form.md) | Renders a custom HTML form. Allows for mixing multiple kinds of form input. [survey‑likert](survey-likert.md) | Displays likert-style questions. [survey‑multi‑choice](survey-multi-choice.md) | Displays multiple choice questions with one answer allowed per question. [survey‑multi‑select](survey-multi-select.md) | Displays multiple choice questions with multiple answes allowed per question. -[survey‑text](survey-text.md) | Shows a prompt with a text box. The subject writes a response and then submits by clicking a button. -[video‑button‑response](video-button-response.md) | Displays a video file with many options for customizing playback. Subject responds to the video by pressing a button. -[video‑keyboard‑response](video-keyboard-response.md) | Displays a video file with many options for customizing playback. Subject responds to the video by pressing a key. -[video‑slider‑response](video-slider-response.md) | Displays a video file with many options for customizing playback. Subject responds to the video by moving a slider. +[survey‑text](survey-text.md) | Shows a prompt with a text box. The participant writes a response and then submits by clicking a button. +[video‑button‑response](video-button-response.md) | Displays a video file with many options for customizing playback. participant responds to the video by pressing a button. +[video‑keyboard‑response](video-keyboard-response.md) | Displays a video file with many options for customizing playback. participant responds to the video by pressing a key. +[video‑slider‑response](video-slider-response.md) | Displays a video file with many options for customizing playback. participant responds to the video by moving a slider. [virtual‑chinrest](virtual-chinrest.md) | An implementation of the "virutal chinrest" procedure developed by [Li, Joo, Yeatman, and Reinecke (2020)](https://doi.org/10.1038/s41598-019-57204-1). Calibrates the monitor to display items at a known physical size by having participants scale an image to be the same size as a physical credit card. Then uses a blind spot task to estimate the distance between the participant and the display. -[visual‑search‑circle](visual-search-circle.md) | A customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The subject indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. +[visual‑search‑circle](visual-search-circle.md) | A customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The participant indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. [webgazer‑calibrate](webgazer-calibrate.md) | Calibrates the WebGazer extension for eye tracking. [webgazer‑init‑camera](webgazer-init-camera.md) | Initializes the camera and helps the participant center their face for eye tracking. [webgazer‑validate](webgazer-validate.md) | Performs validation to measure precision and accuracy of WebGazer eye tracking predictions. diff --git a/docs/plugins/maxdiff.md b/docs/plugins/maxdiff.md index ca086193..a3ebc6fe 100644 --- a/docs/plugins/maxdiff.md +++ b/docs/plugins/maxdiff.md @@ -24,7 +24,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the maxdiff table first appears on the screen until the subject's response. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the maxdiff table first appears on the screen until the participant's response. labels | object | An object with two keys, `left` and `right`, containing the labels (strings) corresponding to the left and right response columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. response | object | An object with two keys, `left` and `right`, containing the alternatives selected on the left and right columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. diff --git a/docs/plugins/reconstruction.md b/docs/plugins/reconstruction.md index 1b9422b2..a01c2ea1 100644 --- a/docs/plugins/reconstruction.md +++ b/docs/plugins/reconstruction.md @@ -2,9 +2,9 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-reconstruction/CHANGELOG.md). -This plugin allows a subject to interact with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time. +This plugin allows a participant to interact with a stimulus by modifying a parameter of the stimulus and observing the change in the stimulus in real-time. -The stimulus must be defined through a function that returns an HTML-formatted string. The function should take a single value, which is the parameter that can be modified by the subject. The value can only range from 0 to 1. See the example at the bottom of the page for a sample function. +The stimulus must be defined through a function that returns an HTML-formatted string. The function should take a single value, which is the parameter that can be modified by the participant. The value can only range from 0 to 1. See the example at the bottom of the page for a sample function. ## Parameters diff --git a/docs/plugins/same-different-html.md b/docs/plugins/same-different-html.md index 9979b5e0..01463fd9 100644 --- a/docs/plugins/same-different-html.md +++ b/docs/plugins/same-different-html.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-same-different-html/CHANGELOG.md). -The same-different-html plugin displays two stimuli sequentially. Stimuli are HTML objects. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example. +The same-different-html plugin displays two stimuli sequentially. Stimuli are HTML objects. The participant responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example. ## Parameters @@ -12,12 +12,12 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | -------------------- | ------- | ------------- | ---------------------------------------- | | stimuli | array | *undefined* | A pair of stimuli, represented as an array with two entries, one for each stimulus. A stimulus is a string containing valid HTML markup. Stimuli will be shown in the order that they are defined in the array. | | answer | string | *undefined* | Either `'same'` or `'different'`. | -| same_key | string | 'q' | The key that subjects should press to indicate that the two stimuli are the same. | -| different_key | string | 'p' | The key that subjects should press to indicate that the two stimuli are different. | -| first_stim_duration | numeric | 1000 | How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the subject presses any key. | +| same_key | string | 'q' | The key that participants should press to indicate that the two stimuli are the same. | +| different_key | string | 'p' | The key that participants should press to indicate that the two stimuli are different. | +| first_stim_duration | numeric | 1000 | How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant presses any key. | | gap_duration | numeric | 500 | How long to show a blank screen in between the two stimuli. | -| second_stim_duration | numeric | 1000 | How long to show the second stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the subject responds. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| second_stim_duration | numeric | 1000 | How long to show the second stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant responds. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | ## Data Generated @@ -26,18 +26,18 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | array | An array of length 2 containing the HTML-formatted content that the subject saw for each trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject's response matched the `answer` for this trial. | +| stimulus | array | An array of length 2 containing the HTML-formatted content that the participant saw for each trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the second stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant's response matched the `answer` for this trial. | | answer | string | The correct answer to the trial, either `'same'` or `'different'`. | Additionally, if `first_stim_duration` is null, then the following data is also collected: | Name | Type | Value | | --------------- | ------- | ---------------------------------------- | -| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. | -| response_stim1 | string | Indicates which key the subject pressed to continue. | +| rt_stim1 | numeric | The response time in milliseconds for the participant to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the participant's response. | +| response_stim1 | string | Indicates which key the participant pressed to continue. | ## Install diff --git a/docs/plugins/same-different-image.md b/docs/plugins/same-different-image.md index f540b481..920e9449 100644 --- a/docs/plugins/same-different-image.md +++ b/docs/plugins/same-different-image.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-same-different-image/CHANGELOG.md). -The same-different-image plugin displays two stimuli sequentially. Stimuli are images. The subject responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example. +The same-different-image plugin displays two stimuli sequentially. Stimuli are images. The participant responds using the keyboard, and indicates whether the stimuli were the same or different. Same does not necessarily mean identical; a category judgment could be made, for example. ## Parameters @@ -12,12 +12,12 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | -------------------- | ------- | ------------- | ---------------------------------------- | | stimuli | array | *undefined* | A pair of stimuli, represented as an array with two entries, one for each stimulus. The stimulus is a path to an image file. Stimuli will be shown in the order that they are defined in the array. | | answer | string | *undefined* | Either `'same'` or `'different'`. | -| same_key | string | 'q' | The key that subjects should press to indicate that the two stimuli are the same. | -| different_key | string | 'p' | The key that subjects should press to indicate that the two stimuli are different. | -| first_stim_duration | numeric | 1000 | How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the subject presses any key. | +| same_key | string | 'q' | The key that participants should press to indicate that the two stimuli are the same. | +| different_key | string | 'p' | The key that participants should press to indicate that the two stimuli are different. | +| first_stim_duration | numeric | 1000 | How long to show the first stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant presses any key. | | gap_duration | numeric | 500 | How long to show a blank screen in between the two stimuli. | -| second_stim_duration | numeric | 1000 | How long to show the second stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the subject responds. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| second_stim_duration | numeric | 1000 | How long to show the second stimulus for in milliseconds. If the value of this parameter is null then the stimulus will be shown until the participant responds. | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | ## Data Generated @@ -26,18 +26,18 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| stimulus | array | An array of length 2 containing the paths to the image files that the subject saw for each trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject's response matched the `answer` for this trial. | +| stimulus | array | An array of length 2 containing the paths to the image files that the participant saw for each trial. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the second stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant's response matched the `answer` for this trial. | | answer | string | The correct answer to the trial, either `'same'` or `'different'`. | Additionally, if `first_stim_duration` is null, then the following data is also collected: | Name | Type | Value | | --------------- | ------- | ---------------------------------------- | -| rt_stim1 | numeric | The response time in milliseconds for the subject to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the subject's response. | -| response_stim1 | string | Indicates which key the subject pressed to continue. | +| rt_stim1 | numeric | The response time in milliseconds for the participant to continue after the first stimulus. The time is measured from when the first stimulus appears on the screen until the participant's response. | +| response_stim1 | string | Indicates which key the participant pressed to continue. | ## Install diff --git a/docs/plugins/serial-reaction-time-mouse.md b/docs/plugins/serial-reaction-time-mouse.md index fa984777..2b21bc45 100644 --- a/docs/plugins/serial-reaction-time-mouse.md +++ b/docs/plugins/serial-reaction-time-mouse.md @@ -19,7 +19,7 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | trial_duration | numeric | null | The maximum length of time of the trial, not including feedback. | | fade_duration | numeric | null | If a positive number, the target will progressively change color at the start of the trial, with the transition lasting this many milliseconds. | | allow_nontarget_responses | boolean | false | If true, the user can make nontarget response. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which keys to press). | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which keys to press). | ## Data Generated @@ -29,7 +29,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | ------ | ------- | ---------------------------------------- | | grid | array | The grid representation. Each inner array represents a single row. The entries in the inner arrays represent the columns. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | | target | array | The `[row, column]` target location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the second stimulus first appears on the screen until the participant's response. | | response | array | The `[row, column]` response location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | | correct | boolean | Whether the response location matches the target location (`true`) or not (`false`). | diff --git a/docs/plugins/serial-reaction-time.md b/docs/plugins/serial-reaction-time.md index 0f2ed755..74530a30 100644 --- a/docs/plugins/serial-reaction-time.md +++ b/docs/plugins/serial-reaction-time.md @@ -21,7 +21,7 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | show_response_feedback | boolean | false | If true, show feedback indicating where the user responded and whether it was correct. | | feedback_duration | numeric | 200 | The length of time in milliseconds to show the feedback. | | fade_duration | numeric | null | If a positive number, the target will progressively change color at the start of the trial, with the transition lasting this many milliseconds. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which keys to press). | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which keys to press). | ## Data Generated @@ -31,9 +31,9 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | --------- | ------- | ---------------------------------------- | | grid | array | The representation of the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | | target | array | The representation of the target location on the grid. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the second stimulus first appears on the screen until the subject's response. | -| correct | boolean | `true` if the subject's response matched the target. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the second stimulus first appears on the screen until the participant's response. | +| correct | boolean | `true` if the participant's response matched the target. | ## Install diff --git a/docs/plugins/sketchpad.md b/docs/plugins/sketchpad.md index 50110b20..b230dd0b 100644 --- a/docs/plugins/sketchpad.md +++ b/docs/plugins/sketchpad.md @@ -47,7 +47,7 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | undo_button_label | string | `"Undo"` | The label for the button that enables an undo action. | | show_redo_button | bool | true | Whether to show the button that enables a redo action. Note that `show_undo_button` must be `true` for the redo button to show up. | | redo_button_label | string | `"Redo"` | The label for the button that enables a redo action. | -| choices | array of keys | `"NO_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to end the trial. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"NO_KEYS"` means that no keys will be accepted as valid responses. Specifying `"ALL_KEYS"` will mean that all responses are allowed. | +| choices | array of keys | `"NO_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to end the trial. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"NO_KEYS"` means that no keys will be accepted as valid responses. Specifying `"ALL_KEYS"` will mean that all responses are allowed. | | trial_duration | int | null | Length of time before the trial ends. If `null` the trial will continue indefinitely (until another way of ending the trial occurs). | | show_countdown_trial_duration | bool | false | Whether to show a timer that counts down until the end of the trial when `trial_duration` is not `null`. | | countdown_timer_html | string | `' remaining'` | The HTML to use for rendering the countdown timer. The element with `id="sketchpad-timer"` will have its content replaced by a countdown timer in the format `MM:SS`. diff --git a/docs/plugins/survey-html-form.md b/docs/plugins/survey-html-form.md index e86f3467..34b41899 100644 --- a/docs/plugins/survey-html-form.md +++ b/docs/plugins/survey-html-form.md @@ -2,7 +2,7 @@ Current version: 1.0.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-html-form/CHANGELOG.md). -The survey-html-form plugin displays a set of `` from a HTML string. The type of input can be freely chosen, for a list of possible input types see the [MDN page on inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). The subject provides answers to the input fields. +The survey-html-form plugin displays a set of `` from a HTML string. The type of input can be freely chosen, for a list of possible input types see the [MDN page on inputs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). The participant provides answers to the input fields. ## Parameters @@ -23,8 +23,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -response | object | An object containing the response for each input. The object will have a separate key (variable) for the response to each input, with each variable being named after its corresponding input element. Each response is a string containing whatever the subject answered for this particular input. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -rt | numeric | The response time in milliseconds for the subject to make a response. | +response | object | An object containing the response for each input. The object will have a separate key (variable) for the response to each input, with each variable being named after its corresponding input element. Each response is a string containing whatever the participant answered for this particular input. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | +rt | numeric | The response time in milliseconds for the participant to make a response. | ## Simulation Mode diff --git a/docs/plugins/survey-likert.md b/docs/plugins/survey-likert.md index 9ba5b707..189446f7 100644 --- a/docs/plugins/survey-likert.md +++ b/docs/plugins/survey-likert.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-likert/CHANGELOG.md). -The survey-likert plugin displays a set of questions with Likert scale responses. The subject responds by selecting a radio button. +The survey-likert plugin displays a set of questions with Likert scale responses. The participant responds by selecting a radio button. ## Parameters @@ -24,7 +24,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | object | An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as integers, representing the position selected on the likert scale for that question. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. | +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. | question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | ## Install diff --git a/docs/plugins/survey-multi-choice.md b/docs/plugins/survey-multi-choice.md index da496fda..afedfe0a 100644 --- a/docs/plugins/survey-multi-choice.md +++ b/docs/plugins/survey-multi-choice.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-multi-choice/CHANGELOG.md). -The survey-multi-choice plugin displays a set of questions with multiple choice response fields. The subject selects a single answer. +The survey-multi-choice plugin displays a set of questions with multiple choice response fields. The participant selects a single answer. ## Parameters @@ -23,7 +23,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | object | An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. The responses are recorded as the name of the option label selected (string). If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. | +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. | question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | ## Install diff --git a/docs/plugins/survey-multi-select.md b/docs/plugins/survey-multi-select.md index b8a85c78..fc8c14c7 100644 --- a/docs/plugins/survey-multi-select.md +++ b/docs/plugins/survey-multi-select.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-multi-select/CHANGELOG.md). -The survey-multi-select plugin displays a set of questions with multiple select response fields. The subject could select multiple answers. +The survey-multi-select plugin displays a set of questions with multiple select response fields. The participant can select multiple answers. ## Parameters @@ -24,7 +24,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | object | An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. For each question, the responses are recorded as arrays containing any response options that were selected (strings). If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. | +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) were submitted. | question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | ## Install diff --git a/docs/plugins/survey-text.md b/docs/plugins/survey-text.md index b1bd3ca2..ba660b9b 100644 --- a/docs/plugins/survey-text.md +++ b/docs/plugins/survey-text.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-survey-text/CHANGELOG.md). -The survey-text plugin displays a set of questions with free response text fields. The subject types in answers. +The survey-text plugin displays a set of questions with free response text fields. The participant types in answers. ## Parameters @@ -10,7 +10,7 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# Parameter | Type | Default Value | Description ----------|------|---------------|------------ -questions | array | *undefined* | An array of objects, each object represents a question that appears on the screen. Each object contains a prompt, placeholder, required, rows, and columns parameter that will be applied to the question. See examples below for further clarification. `prompt`: Type string, default value of *undefined*. The string is the prompt for the subject to respond to. Each question gets its own response field. `placeholder`: Type string, default value of `""`. The string will create placeholder text in the text field. `required`: Boolean; if `true` then the user must enter a response to submit. `rows`: Type integer, default value of 1. The number of rows for the response text box. `columns`: Type integer, default value of 40. The number of columns for the response text box. `name`: Name of the question. Used for storing data. If left undefined then default names (`Q0`, `Q1`, `...`) will be used for the questions. +questions | array | *undefined* | An array of objects, each object represents a question that appears on the screen. Each object contains a prompt, placeholder, required, rows, and columns parameter that will be applied to the question. See examples below for further clarification. `prompt`: Type string, default value of *undefined*. The string is the prompt for the participant to respond to. Each question gets its own response field. `placeholder`: Type string, default value of `""`. The string will create placeholder text in the text field. `required`: Boolean; if `true` then the user must enter a response to submit. `rows`: Type integer, default value of 1. The number of rows for the response text box. `columns`: Type integer, default value of 40. The number of columns for the response text box. `name`: Name of the question. Used for storing data. If left undefined then default names (`Q0`, `Q1`, `...`) will be used for the questions. randomize_question_order | boolean | `false` | If true, the display order of `questions` is randomly determined at the start of the trial. In the data object, `Q0` will still refer to the first question in the array, regardless of where it was presented visually. preamble | string | empty string | HTML formatted string to display at the top of the page above all the questions. button_label | string | 'Continue' | The text that appears on the button to finish the trial. @@ -23,7 +23,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | object | An object containing the response for each question. The object will have a separate key (variable) for each question, with the first question in the trial being recorded in `Q0`, the second in `Q1`, and so on. For each question, the response is a string containing whatever text was in the response box when the responses were submitted. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) were submitted. | +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) were submitted. | question_order | array | An array with the order of questions. For example `[2,0,1]` would indicate that the first question was `trial.questions[2]` (the third item in the `questions` parameter), the second question was `trial.questions[0]`, and the final question was `trial.questions[1]`. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | ## Install diff --git a/docs/plugins/survey.md b/docs/plugins/survey.md index 78c2a364..04c8ce19 100644 --- a/docs/plugins/survey.md +++ b/docs/plugins/survey.md @@ -187,7 +187,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | object | An object containing the response to each question. The object will have a separate key (variable) for each question, with the first question on the first page being recorded in `P0_Q0`, the second question on the first page in `P0_Q1`, and so on. If the `name` parameter is defined for the question, then the response object will use the value of `name` as the key for each question. The response type will depend on the question type. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. Note that, if any questions use the `other` option (`add_other_option: true`), then the response value will be the `other_option_text` (e.g. "Other") and any text written in the textbox will be saved as "(question name)-Comment". | -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the questions first appear on the screen until the subject's response(s) are submitted. | +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the questions first appear on the screen until the participant's response(s) are submitted. | ## Simulation Mode diff --git a/docs/plugins/video-button-response.md b/docs/plugins/video-button-response.md index 64ff1b15..345679d3 100644 --- a/docs/plugins/video-button-response.md +++ b/docs/plugins/video-button-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-button-response/CHANGELOG.md). -This plugin plays a video and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a button response from being made before the video has finished playing. The button itself can be customized using HTML formatting. +This plugin plays a video and records responses generated by button click. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the participant responds, when the video file has finished playing, or if the participant has failed to respond within a fixed length of time. You can also prevent a button response from being made before the video has finished playing. The button itself can be customized using HTML formatting. Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information. @@ -17,17 +17,17 @@ choices | array of strings | *undefined* | Labels for the buttons. Each differen button_html | HTML string | `''` | A template of HTML for generating the button elements. You can override this to create customized buttons of various kinds. The string `%choice%` will be changed to the corresponding element of the `choices` array. You may also specify an array of strings, if you need different HTML to render for each button. If you do specify an array, the `choices` array and this array must have the same length. The HTML from position 0 in the `button_html` array will be used to create the button for element 0 in the `choices` array, and so on. margin_vertical | string | '0px' | Vertical margin of the button(s). margin_horizontal | string | '8px' | Horizontal margin of the button(s). -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). width | numeric | width of the video file | The width of the video display in pixels. height | numeric | heigh of the video file | The height of the video display in pixels. autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded. -controls | boolean | false | If true, controls for the video player will be available to the subject. They will be able to pause the video or move the playback to any point in the video. +controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video. start | numeric | null | If given a value, the video will start at this time point in seconds. stop| numeric | null | If given a value, the video will stop at this time point in seconds. rate | numeric | null | The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. trial_ends_after_video | bool | false | If true, then the trial will end as soon as the video file finishes playing. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. response_allowed_while_playing | boolean | true | If true, then responses are allowed while the video is playing. If false, then the video must finish playing before the button choices are enabled and a response is accepted. Once the video has played all the way through, the buttons are enabled and a response is allowed (including while the video is being re-played via on-screen playback controls). @@ -37,8 +37,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ -response | numeric | Indicates which button the subject pressed. The first button in the `choices` array is 0, the second is 1, and so on. -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. +response | numeric | Indicates which button the participant pressed. The first button in the `choices` array is 0, the second is 1, and so on. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. stimulus | array | The `stimulus` array. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. ## Simulation Mode diff --git a/docs/plugins/video-keyboard-response.md b/docs/plugins/video-keyboard-response.md index 76603443..b192fd41 100644 --- a/docs/plugins/video-keyboard-response.md +++ b/docs/plugins/video-keyboard-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-keyboard-response/CHANGELOG.md). -This plugin plays a video file and records a keyboard response. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the video has finished playing. +This plugin plays a video file and records a keyboard response. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the participant responds, when the video file has finished playing, or if the participant has failed to respond within a fixed length of time. You can also prevent a keyboard response from being recorded before the video has finished playing. Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information. @@ -13,18 +13,18 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# | Parameter | Type | Default Value | Description | | ------------------------------ | ---------------- | ----------------------- | ---------------------------------------- | | stimulus | array | *undefined* | An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference. | -| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). | +| prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). | | width | numeric | width of the video file | The width of the video display in pixels. | | height | numeric | heigh of the video file | The height of the video display in pixels. | | autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded. | -| controls | boolean | false | If true, controls for the video player will be available to the subject. They will be able to pause the video or move the playback to any point in the video. | +| controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video. | | start | numeric | null | If given a value, the video will start at this time point in seconds. | | stop | numeric | null | If given a value, the video will stop at this time point in seconds. | | rate | numeric | null | The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. | -| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the subject is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | +| choices | array of strings | `"ALL_KEYS"` | This array contains the key(s) that the participant is allowed to press in order to respond to the stimulus. Keys should be specified as characters (e.g., `'a'`, `'q'`, `' '`, `'Enter'`, `'ArrowDown'`) - see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) and [this page (event.key column)](https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/) for more examples. Any key presses that are not listed in the array will be ignored. The default value of `"ALL_KEYS"` means that all keys will be accepted as valid responses. Specifying `"NO_KEYS"` will mean that no responses are allowed. | | trial_ends_after_video | bool | false | If true, then the trial will end as soon as the video file finishes playing. | -| trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | -| response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | +| trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. | +| response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. | | response_allowed_while_playing | boolean | true | If true, then responses are allowed while the video is playing. If false, then the video must finish playing before a keyboard response is accepted. Once the video has played all the way through, a valid keyboard response is allowed (including while the video is being re-played via on-screen playback controls). | ## Data Generated @@ -33,8 +33,8 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | --------- | ------- | ---------------------------------------- | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | stimulus | array | The `stimulus` array. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | ## Simulation Mode diff --git a/docs/plugins/video-slider-response.md b/docs/plugins/video-slider-response.md index d811ebd6..00071874 100644 --- a/docs/plugins/video-slider-response.md +++ b/docs/plugins/video-slider-response.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-video-slider-response/CHANGELOG.md). -This plugin plays a video and allows the subject to respond by dragging a slider. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the subject responds, when the video file has finished playing, or if the subject has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the video has finished playing. +This plugin plays a video and allows the participant to respond by dragging a slider. The stimulus can be displayed until a response is given, or for a pre-determined amount of time. The trial can be ended automatically when the participant responds, when the video file has finished playing, or if the participant has failed to respond within a fixed length of time. You can also prevent the slider response from being made before the video has finished playing. Video files can be automatically preloaded by jsPsych using the [`preload` plugin](preload.md). However, if you are using timeline variables or another dynamic method to specify the video stimulus, you will need to [manually preload](../overview/media-preloading.md#manual-preloading) the videos. Also note that video preloading is disabled when the experiment is running as a file (i.e. opened directly in the browser, rather than through a server), in order to prevent CORS errors - see the section on [Running Experiments](../overview/running-experiments.md) for more information. @@ -13,11 +13,11 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# Parameter | Type | Default Value | Description ----------|------|---------------|------------ stimulus | array | *undefined* | An array of file paths to the video. You can specify multiple formats of the same video (e.g., .mp4, .ogg, .webm) to maximize the [cross-browser compatibility](https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats). Usually .mp4 is a safe cross-browser option. The plugin does not reliably support .mov files. The player will use the first source file in the array that is compatible with the browser, so specify the files in order of preference. -prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the subject is supposed to take (e.g., which key to press). +prompt | string | null | This string can contain HTML markup. Any content here will be displayed below the stimulus. The intention is that it can be used to provide a reminder about the action the participant is supposed to take (e.g., which key to press). width | numeric | width of the video file | The width of the video display in pixels. height | numeric | heigh of the video file | The height of the video display in pixels. autoplay | boolean | true | If true, the video will begin playing as soon as it has loaded. -controls | boolean | false | If true, controls for the video player will be available to the subject. They will be able to pause the video or move the playback to any point in the video. +controls | boolean | false | If true, controls for the video player will be available to the participant. They will be able to pause the video or move the playback to any point in the video. start | numeric | null | If given a value, the video will start at this time point in seconds. stop| numeric | null | If given a value, the video will stop at this time point in seconds. rate | numeric | null | The playback rate of the video. 1 is normal, <1 is slower, >1 is faster. @@ -27,11 +27,11 @@ slider_start | integer | 50 | Sets the starting value of the slider step | integer | 1 | Sets the step of the slider. This is the smallest amount by which the slider can change. labels | array of strings | [] | Labels displayed at equidistant locations on the slider. For example, two labels will be placed at the ends of the slider. Three labels would place two at the ends and one in the middle. Four will place two at the ends, and the other two will be at 33% and 67% of the slider width. slider_width | integer | null | Set the width of the slider in pixels. If left null, then the width will be equal to the widest element in the display. -require_movement | boolean | false | If true, the subject must move the slider before clicking the continue button. +require_movement | boolean | false | If true, the participant must move the slider before clicking the continue button. button_label | string | 'Continue' | Label of the button to end the trial. trial_ends_after_video | bool | false | If true, then the trial will end as soon as the video file finishes playing. -trial_duration | numeric | null | How long to wait for the subject to make a response before ending the trial in milliseconds. If the subject fails to make a response before this timer is reached, the subject's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. -response_ends_trial | boolean | true | If true, then the trial will end whenever the subject makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the subject to view a stimulus for a fixed amount of time, even if they respond before the time is complete. +trial_duration | numeric | null | How long to wait for the participant to make a response before ending the trial in milliseconds. If the participant fails to make a response before this timer is reached, the participant's response will be recorded as null for the trial and the trial will end. If the value of this parameter is null, then the trial will wait for a response indefinitely. +response_ends_trial | boolean | true | If true, then the trial will end whenever the participant makes a response (assuming they make their response before the cutoff specified by the `trial_duration` parameter). If false, then the trial will continue until the value for `trial_duration` is reached. You can set this parameter to `false` to force the participant to view a stimulus for a fixed amount of time, even if they respond before the time is complete. response_allowed_while_playing | boolean | true | If true, then responses are allowed while the video is playing. If false, then the video must finish playing before the slider is enabled and the trial can end via the next button click. Once the video has played all the way through, the slider is enabled and a response is allowed (including while the video is being re-played via on-screen playback controls). @@ -42,7 +42,7 @@ In addition to the [default data collected by all plugins](../overview/plugins.m Name | Type | Value -----|------|------ response | numeric | The numeric value of the slider. -rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. +rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. stimulus | array | The `stimulus` array. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. slider_start | numeric | The starting value of the slider. start | numeric | The start time of the video clip. diff --git a/docs/plugins/visual-search-circle.md b/docs/plugins/visual-search-circle.md index 8857d620..08e5627e 100644 --- a/docs/plugins/visual-search-circle.md +++ b/docs/plugins/visual-search-circle.md @@ -2,7 +2,7 @@ Current version: 1.1.1. [See version history](https://github.com/jspsych/jsPsych/blob/main/packages/plugin-visual-search-circle/CHANGELOG.md). -This plugin presents a customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The subject indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. Here is an example using normal and backward Ns: +This plugin presents a customizable visual-search task modelled after [Wang, Cavanagh, & Green (1994)](http://dx.doi.org/10.3758/BF03206946). The participant indicates whether or not a target is present among a set of distractors. The stimuli are displayed in a circle, evenly-spaced, equidistant from a fixation point. Here is an example using normal and backward Ns: ![Sample Visual Search Stimulus](../img/visual_search_example.jpg) @@ -21,7 +21,7 @@ The `target_present` and `fixation_image` parameters must always be specified. O | ------------------ | --------------- | ------------- | ---------------------------------------- | | target | string | null | Path to image file that is the search target. This parameter must specified when the stimuli set is defined using the `target`, `foil` and `set_size` parameters, but should NOT be specified when using the `stimuli` parameter. | | foil | string | null | Path to image file that is the foil/distractor. This image will be repeated for all distractors up to the `set_size` value. This parameter must specified when the stimuli set is defined using the `target`, `foil` and `set_size` parameters, but should NOT be specified when using the `stimuli` parameter. | -| set_size | numeric | null | How many items should be displayed, including the target when `target_present` is `true`? The foil image will be repeated up to this value when `target_present` is `false`, or up to `set_size - 1` when `target_present` is `true`. This parameter must specified when using the `target`, `foil` and `set_size` parameters to define the stimuli set, but should NOT be specified when using the `stimuli` parameter. | +| set_size | numeric | null | How many items should be displayed, including the target when `target_present` is `true`. The foil image will be repeated up to this value when `target_present` is `false`, or up to `set_size - 1` when `target_present` is `true`. This parameter must specified when using the `target`, `foil` and `set_size` parameters to define the stimuli set, but should NOT be specified when using the `stimuli` parameter. | | stimuli | array of images | null | Array containing all of the image files to be displayed. This parameter must be specified when NOT using the `target`, `foil`, and `set_size` parameters to define the stimuli set. | | target_present | boolean | *undefined* | Is the target present? This parameter must always be specified. When using the `target`, `foil` and `set_size` parameters, `false` means that the foil image will be repeated up to the set_size, and `true` means that the target will be presented along with the foil image repeated up to set_size - 1. When using the `stimuli` parameter, this parameter is only used to determine the response accuracy. | | fixation_image | string | *undefined* | Path to image file that is a fixation target. This parameter must always be specified. | @@ -30,7 +30,7 @@ The `target_present` and `fixation_image` parameters must always be specified. O | circle_diameter | numeric | 250 | The diameter of the search array circle in pixels. | | target_present_key | string | 'j' | The key to press if the target is present in the search array. | | target_absent_key | string | 'f' | The key to press if the target is not present in the search array. | -| trial_duration | numeric | null | The maximum amount of time the subject is allowed to search before the trial will continue. A value of null will allow the subject to search indefinitely. | +| trial_duration | numeric | null | The maximum amount of time the participant is allowed to search before the trial will continue. A value of null will allow the participant to search indefinitely. | | fixation_duration | numeric | 1000 | How long to show the fixation image for before the search array (in milliseconds). | ## Data Generated @@ -39,9 +39,9 @@ In addition to the [default data collected by all plugins](../overview/plugins.m | Name | Type | Value | | -------------- | ----------- | ---------------------------------------- | -| correct | boolean | True if the subject gave the correct response. | -| response | string | Indicates which key the subject pressed. | -| rt | numeric | The response time in milliseconds for the subject to make a response. The time is measured from when the stimulus first appears on the screen until the subject's response. | +| correct | boolean | True if the participant gave the correct response. | +| response | string | Indicates which key the participant pressed. | +| rt | numeric | The response time in milliseconds for the participant to make a response. The time is measured from when the stimulus first appears on the screen until the participant's response. | | set_size | numeric | The number of items in the search array | | target_present | boolean | True if the target is present in the search array | | locations | array | Array where each element is the pixel value of the center of an image in the search array. If the target is present, then the first element will represent the location of the target. This will be encoded as a JSON string when data is saved using the `.json()` or `.csv()` functions. | diff --git a/docs/plugins/webgazer-calibrate.md b/docs/plugins/webgazer-calibrate.md index 00e71b96..720e5641 100644 --- a/docs/plugins/webgazer-calibrate.md +++ b/docs/plugins/webgazer-calibrate.md @@ -11,7 +11,7 @@ In addition to the [parameters available in all plugins](../overview/plugins.md# Parameter | Type | Default Value | Description ----------|------|---------------|------------ calibration_points | array | `[[10,10], [10,50], [10,90], [50,10], [50,50], [50,90], [90,10], [90,50], [90,90]]` | Array of points in `[x,y]` coordinates. Specified as a percentage of the screen width and height, from the left and top edge. The default grid is 9 points. -calibration_mode | string | `'click'` | Can specify `click` to have subjects click on calibration points or `view` to have subjects passively watch calibration points. +calibration_mode | string | `'click'` | Can specify `click` to have participants click on calibration points or `view` to have participants passively watch calibration points. repetitions_per_point | numeric | 1 | The number of times to repeat the sequence of calibration points. point_size | numeric | 20 | Diameter of the calibration points in pixels. randomize_calibration_order | bool | `false` | Whether to randomize the order of the calibration points. diff --git a/docs/reference/jspsych-pluginAPI.md b/docs/reference/jspsych-pluginAPI.md index e152fa9d..84b659e4 100644 --- a/docs/reference/jspsych-pluginAPI.md +++ b/docs/reference/jspsych-pluginAPI.md @@ -170,7 +170,7 @@ Return an object that uniquely identifies the keyboard listener. This object can #### Description -Gets a keyboard response from the subject, recording the response time from when the function is first called until a valid response is generated. +Gets a keyboard response from the participant, recording the response time from when the function is first called until a valid response is generated. The keyboard event listener will be bound to the `display_element` declared in `initJsPsych()` (or the `` element if no `display_element` is specified). This allows jsPsych experiments to be embedded in websites with other content without disrupting the functionality of other UI elements. diff --git a/docs/reference/jspsych.md b/docs/reference/jspsych.md index ff293d12..8729ebc3 100644 --- a/docs/reference/jspsych.md +++ b/docs/reference/jspsych.md @@ -17,14 +17,14 @@ The settings object can contain several parameters. None of the parameters are r | Parameter | Type | Description | | -------------------------- | -------- | ---------------------------------------- | -| display_element | string | The ID of an HTML element to display the experiment in. If left blank, jsPsych will use the `` element to display content. All keyboard event listeners are bound to this element. In order for a keyboard event to be detected, this element must have focus (be the last thing that the subject clicked on). | +| display_element | string | The ID of an HTML element to display the experiment in. If left blank, jsPsych will use the `` element to display content. All keyboard event listeners are bound to this element. In order for a keyboard event to be detected, this element must have focus (be the last thing that the participant clicked on). | | on_finish | function | Function to execute when the experiment ends. | | on_trial_start | function | Function to execute when a new trial begins. | | on_trial_finish | function | Function to execute when a trial ends. | | on_data_update | function | Function to execute every time data is stored using the `jsPsych.data.write` method. All plugins use this method to save data (via a call to `jsPsych.finishTrial`, so this function runs every time a plugin stores new data. | | on_interaction_data_update | function | Function to execute every time a new interaction event occurs. Interaction events include clicking on a different window (blur), returning to the experiment window (focus), entering full screen mode (fullscreenenter), and exiting full screen mode (fullscreenexit). | | on_close | function | Function to execute when the user leaves the page. Can be used, for example, to save data before the page is closed. | -| exclusions | object | Specifies restrictions on the browser the subject can use to complete the experiment. See list of options below. *This feature is deprecated as of v7.1 and will be removed in v8.0. The [browser-check plugin](../plugins/browser-check.md) is an improved way to handle exclusions.* | +| exclusions | object | Specifies restrictions on the browser the participant can use to complete the experiment. See list of options below. *This feature is deprecated as of v7.1 and will be removed in v8.0. The [browser-check plugin](../plugins/browser-check.md) is an improved way to handle exclusions.* | | show_progress_bar | boolean | If `true`, then [a progress bar](../overview/progress-bar.md) is shown at the top of the page. Default is `false`. | | message_progress_bar | string | Message to display next to the progress bar. The default is 'Completion Progress'. | | auto_update_progress_bar | boolean | If true, then the progress bar at the top of the page will automatically update as every top-level timeline or trial is completed. | @@ -40,7 +40,7 @@ Possible values for the exclusions parameter above. | Parameter | Type | Description | | ---------- | ------- | ---------------------------------------- | -| min_width | numeric | The minimum width of the browser window. If the width is below this value, a message will be displayed to the subject asking them to maximize their browser window. The experiment will sit on this page until the browser window is large enough. | +| min_width | numeric | The minimum width of the browser window. If the width is below this value, a message will be displayed to the participant asking them to maximize their browser window. The experiment will sit on this page until the browser window is large enough. | | min_height | numeric | Same as above, but with height. | | audio | boolean | Set to true to require support for the WebAudio API (used by plugins that play audio files). | @@ -429,7 +429,7 @@ Returns an object with the following properties: ### Description -This method returns information about the length of the experiment and the subject's current location in the experiment timeline. +This method returns information about the length of the experiment and the participant's current location in the experiment timeline. ### Example @@ -508,7 +508,7 @@ Returns a numeric value indicating the number of milliseconds since `jsPsych.run ### Description -Gets the total time the subject has been in the experiment. +Gets the total time the participant has been in the experiment. ### Example diff --git a/docs/support/support.md b/docs/support/support.md index 92e8aa31..03322e98 100644 --- a/docs/support/support.md +++ b/docs/support/support.md @@ -1,6 +1,6 @@ # Support -For questions about jsPsych the preferred method of support is [GitHub Discussions](https://github.com/jspsych/jsPsych/discussions). Questions are most likely to be answered when they include a reproducible example of the problem. If you can make your code available online and link to the experiment, that will make the question easier to answer. Please consider searching through the archive of Q&A before posting a new question. +For questions about jsPsych, the preferred method of support is [GitHub Discussions](https://github.com/jspsych/jsPsych/discussions). Questions are most likely to be answered when they include a reproducible example of the problem. If you can make your code available online and link to the experiment, that will make the question easier to answer. Please consider searching through the archive of Q&As before posting a new question. If you have identified a problem with jsPsych, such as a bug in the code or an error in the documentation, please [open a new issue](https://github.com/jspsych/jsPsych/issues/new) on GitHub. diff --git a/docs/tutorials/rt-task.md b/docs/tutorials/rt-task.md index ca7a7d27..67543478 100644 --- a/docs/tutorials/rt-task.md +++ b/docs/tutorials/rt-task.md @@ -7,10 +7,10 @@ Despite this simple task, the tutorial covers many of the key features of jsPsyc * Using a plugin to create a standard trial. * Combining plugins together to create new kinds of trials. * Using timeline variables to maximize code reuse. -* Preloading media +* Preloading media. * Randomizing presentation order. * Manipulating, filtering, and aggregating data. -* Using dynamic content to change the experiment parameters based on the subject's responses. +* Using dynamic content to change the experiment parameters based on the participant's responses. ## Part 1: Creating a blank experiment @@ -54,9 +54,9 @@ We'll add trials to this array as we create them. var timeline = []; ``` -Let's greet the subject with a simple welcome message using the [html-keyboard-response](../plugins/html-keyboard-response.md) plugin. +Let's greet the participant with a simple welcome message using the [html-keyboard-response](../plugins/html-keyboard-response.md) plugin. -First, we create a trial that uses the `html-keyboard-response` plugin and contains a simple string to show the subject. +First, we create a trial that uses the `html-keyboard-response` plugin and contains a simple string to show the participant. As explained on the [plugins documentation page](../overview/plugins.md), the trial object must have a `type` parameter that tells jsPsych which plugin to use. The value of `type` is similar to the plugin name, but starts with `jsPsych` and is written in camel case rather than with dashes. So to use the `html-keyboard-response` plugin, we need to write `jsPsychHtmlKeyboardResponse` as the trial type. @@ -116,7 +116,7 @@ After each step in the tutorial you can view the complete code up to that point ## Part 3: Show instructions -We can use the same basic structure from part 2 to create a new `html-keyboard-response` trial that shows instructions to the subject. +We can use the same basic structure from part 2 to create a new `html-keyboard-response` trial that shows instructions to the participant. The only difference in this trial is that we will use HTML formatting to control how the instructions display and we will add a two second gap after the trial using the `post_trial_gap` parameter. The trial definition looks like this: @@ -145,7 +145,7 @@ var instructions = { !!! tip In JavaScript there are three different ways to define a `string`. You can use single quotes `'`, double quotes `"`, or backticks `` ` ``. Using backticks has two advantages over the other approaches, especially when you are creating long strings with HTML. You can extend the `string` across multiple lines and you can use [template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to easily incorporate variables. -Notice that the HTML includes `` tags to display the images that the subject will be responding to. +Notice that the HTML includes `` tags to display the images that the participant will be responding to. You'll need to download these image files. Right-click on each image below and select *Save image as...*. Put the images in a folder called `img` in the experiment folder you created in part 1. @@ -232,7 +232,7 @@ We need to start by loading this plugin by adding a `