Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Created: January 25, 2020
Last Modified: January 20, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
This script implements a Change Detection Task, a measure of Visual Working Memory. The implemented procedure is based on Harris et al (2020).
Harris, A.M et al (2020). Behavioral and electrophysiological evidence for a dissociation between working memory capacity and feature-based attention. Cortex, 129, 158-174. (Change Task Description: p.160-161)
12 minutes
Participants view short displays of 4/6/8 colorful squares that are followed by a single probe square located in one of the display square's positions. Participants have to decide if the color of the probe is the same or different than the color of the square that previously sat in the probe's location.
3 array sizes (4, 6, 8) are tested in a blocked design.
- by default, all participants work from smallest (4) to largest (8) array size
- by default all trial configurations (square locations/color, probe location/color) within an array size
are run in a fixed sequence* (see parameters.runFixedDesign under Editable Parameters)
Each level:
- 6 practice trials (fixed sequence) - half the trials present the probe in the same color
- 60 test trials (fixed sequence) - half the trials present the probe in the same color
- all trials provide feedback
- probe Position: the position of the probe is randomly selected
- Display Square Colors: the colors of the display squares are randomly selected (without replacement)
from 7 possible colors: "white", "black", "purple", "green", "red", "blue", yellow
( for level8 trials, one randomly selected color is repeated) - see Harris et al (2020)
- Probe Color: the probe color for 'different' trials is either
a) selected from the remaining 6 colors
(in which case the probe can have colors not presented during the display for level4/6 trials)
b) selected from the remaining colors of the displayed squares (DEFAULT setting in this script, see Editable Parameters)
Trial Sequence:
- array presented for 150ms (editable parameter) in an 'invisible' gray square on a gray background
- gray screen alone presented for 900ms (editable parameters) - retention interval
- probe is presented until response
- iti (blank gray screen) with feedback is presented for 500ms (editable parameters)
•Generation of default/fixed trial configurations:
The default fixed trial configurations were generated with square sizes of size 15% canvasheight
within a presentation square of 80% canvasheight size and a 'square buffer' of 2% of canvasheight
TIP: to generate a new fixed sequence, you can run this script once with parameter.runFixedDesign = false
and copy the randomly generated position/color data from the data file into the corresponding
position/color lists under section LISTS
If needed:
-> you can change the size of the 'invisible' gray presentationsquare under Editable Parameters
-> you can change the size of the display squares under Editable Parameters
( the max square size is 15%; this script automatically downsizes greater sizes to 15%)
The stimuli in this script are presented with proportional sizing relative to the active canvas.
The active canvas determined for this script is the largest possible rectangle of width:height = 4:3
that can be found on the current monitor. For square sizing check section Editable Parameters below.
If absolute sizing is needed (stimuli should have the same absolute size across monitors),
check section DEFAULTS for more information.
provided by Millisecond - can be edited under section Editable Instructions
File Name: changedetectiontask_summary*.iqdat
| Name | Description |
|---|---|
| inquisit.version | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| startDate | Date the session was run |
| startTime | Time the session was run |
| subjectId | Participant ID |
| groupId | Group number |
| sessionId | Session number |
| elapsedTime | Session duration in ms |
| completed | 0 = Test was not completed 1 = Test was completed |
| runFixedDesign | True (1) = the fixed design (with default trial lists -> default square positionscolors) will be run false (0) = the script will generate new lists (new square positioncolors) during runtime at the start of the script |
| useOnlyArrayColorsForProbe | True (1) = the color of the different probe is only sampled from the colors used in the preceding array false (0) = the color of the different probe is sampled from all 6 colors (that are not used for the target square) |
| presentationSquareHeight | The proportional size of the 'invisible' gray presentation square relative to canvas height the default squares are presented in an 'invisible' gray square of size 80% |
| squareHeight | The proportional size of the array squares relative to canvas height the default square locations were generated with 'squareHeight' = 15% |
| squareHeightMM | The absolute size (in mm) of the presented array squares on the current monitor ###Performance Data |
| propCorrect | Overall proportion correct (across all conditions) |
| meanCorrRT | Mean response time (in ms) for correct responses; across all conditions |
| k4 | K-score for level n trials calculated as = (n4HitRate + n4CRrate - 1)*4 |
| n4HitRate | The HitRate for level n signal (=same) trials (hit = correctly responding that color was the same ) |
| n4HitRT | The response time (in ms) for hits |
| n4CRRate | The correct rejection rate for level n noise (=different) trials (CR = correctly responding that color was different) |
| n4CRRT | The mean response time (in ms) for correct rejections (same for level6 and level8 trials) |
| kOverall | The unweighted mean of all three K-scores |
File Name: changedetectiontask_raw*.iqdat
| Name | Description |
|---|---|
| build | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| date | Date the session was run |
| time | Time the session was run |
| subject | Participant ID |
| group | Group number |
| session | Session number |
Design Parameters |
|
| runFixedDesign | True (1) = the fixed design (with default trial lists -> default square positionscolors) will be run false (0) = the script will generate new lists (new square positioncolors) during runtime at the start of the script |
| useOnlyArrayColorsForProbe | True (1) = the color of the different probe is only sampled from the colors used in the preceding array false (0) = the color of the different probe is sampled from all 6 colors (that are not used for the target square) |
| presentationSquareHeight | The proportional size of the 'invisible' gray presentation square relative to canvas height the default squares are presented in an 'invisible' gray square of size 80% |
| squareHeight | The proportional size of the array squares relative to canvas height the default square locations were generated with 'squareHeight' = 15% |
| squareHeightMM | The absolute size (in mm) of the presented array squares on the current monitor |
| blockCode | Name of the current block |
| blockNum | Number of the current block |
| trialCode | Name of the current trial |
| trialNum | Number of the current trial |
| n | The current number of squares presented (array size) |
| index | Helper variable to select square positionscolors; default setting is by sequential selection |
| trialType | 1 = same (probe color is the same as the color of the square that was presented in the same location) 2 = different (probe color is different from the color of the square that was presented in the same location) |
| response | Scancode of response button 31 = S; 32 = D |
| responseCategory | 'same' or 'different' |
| correct | 1 = response was correct; 0 = response was incorrect |
| latency | Response time in ms; measured from onset of probe ###the proportional square positions (horizontal: 0%(left)-100%(right); vertical: 0%(top) to 100%(bottom)) x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7, x8, y8, ###square colors color1, color2, color3, color4, color5, color6, color7, color8, ###probe |
| probe | The square location that the probe occupies (for level4; 1-4; for level6: 1-6; for level8: 1-8) |
| probeX | The horizontal coordinate of the probe (should match with coordinates of the square location that the probe occupies) |
| probeY | The vertical coordinate of the probe (should match with coordinates of the square location that the probe occupies) |
| probeColor | The color of the probe ###Square Distance Check Variables: store the distances btw. the individual array squares |
| bufferPX | The square distance buffer in pixels |
| bufferMM | The square distance buffer converted into mm |
| squareDistanceCheck | 1 = all array square distances >= expressions.minDistPX 0 = at least one distance < expressions.minDistPX (should not happen but in some cases rounding errors might lead to 'false positive' alerts. Squares might have overlapped if: pixel distance < (minDistPX-bufferPX) |
| overlapSuccess | Similar to expressions.squareDistanceCheck, but pixel distance < (minDistPX-bufferPX) 0 = overlap 1 = no overlap |
| minDistPX | The minimum distance (in pixel) that squares should be apart |
| minDistMM | The minimum distance (in mm) that the square should be be apart |
| d12-d78 | The pixel distance between each presented square Example: d12 = pixel distance btw. center of square1 and center of square2 |
| minObservedSquareDistancePX | Minimum observed pixel distance of the squares |
| maxObservedSquareDistancePX | Maximum observed pixel distance of the squares |
| minObservedSquareDistanceMM | Minimum observed mm-distance of the squares |
| maxObservedSquareDistanceMM | Maximum observed mm-distance of the squares |
The procedure can be adjusted by setting the following parameters.
| Name | Description | Default |
|---|---|---|
| runFixedDesign | True = the fixed design (with default trial lists of default positions/colors) will be run (DEFAULT) false = the script will generate new lists of positions/colors during runtime at the start of the script if set to false, the script might take some time at the start of the script to generate the lists (times will vary) | true |
| useOnlyArrayColorsForProbe | True = the color of the 'different' probe is only sampled from the colors used in the preceding array (DEFAULT) false = the color of the 'different' probe is sampled from all 6 colors (that are not used for the target square) | true |
Response Keys |
||
| leftResponseKey | The left response key ( based on location of key on English keyboards) | "S" |
| rightResponseKey | The right response key ( based on location of key on English keyboards) | "D" |
| sameKey | In this script the left response key is the correct key for same trials (probe's color matches the color of the target) | parameters.leftResponseKey |
| differentKey | In this script the right response key is the correct key for different trials (probe's color does not match the color of the target) | parameters.rightResponseKey |
Sizing Parameters |
||
| presentationSquareHeight | The proportional size of the 'invisible' array presentation square relative to canvas height ( 85% is the maximum) the default squares were generated for an 'invisible' gray square of size 80%; 80% is therefore the minimum size possible IF parameters.runFixedDesign = true) | 80% |
| squareHeight | The proportional size of the display squares relative to canvas height (here: 15%) the default square locations were generated with 'squareHeight' = 15% 15% is the MAX square size supported (bigger sizes will automatically be reduced to 15%) Smaller sizes can safely be used with default locations, however minimum square distances are calculated based on a square size 15% | 15% |
| buffer | The centers of squares have to be separated by 2 times the outer radius of one square plus the buffer outer radius: circle through corners of a square buffer: percent canvasheight !!!NOTES a) the buffer setting is ONLY relevant if parameters.runFixedDesign = false and new positions will be generated. However: If the the buffersize is too large, the script will have difficulty generating positions for the different levels; for this reason the script imposes a 5% limit. b) the default settings were generated with a square of size 15% canvasheight and a buffer of 2% canvasheight | 2% |
Duration Parameters |
||
| readyDuration | Duration (in ms) of the get-ready trials | 5000 |
| arrayDuration | The duration (in ms) that the array of colored squares is presented | 150 |
| retentionInterval | The delay duration (in ms) after which the probe is presented | 900 |
| feedbackDuration | Duration (in ms) of feedback stimulus before the next array is presented feedback is presented immediately after a response is made | 500 |