Return to the Line Counting Task page
						
										Line Counting Task - custom
SCRIPT INFO

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 02-28-2018
last updated: 07-16-2018 by K.Borchert (katjab@millisecond.com) for Millisecond Software LLC

Script Copyright © 07-16-2018 Millisecond Software

07/16/2018 (KB)
- added optional repeat for the practice session

07/10/2018 (KB)
- renamed summary variables

07/09/2018 (SD)
- added median reaction time measures

3/14/18 (KB)
- added dropdown menu to select image order
- changed block set-up to accomodate image order choice
- added values.countTestRuns

BACKGROUND INFO 

											*Purpose*
This script implements a custom line counting task for Dr. James Bjork

Reference:
Passamonti, L. et al (2017). Atomoxetine effects on attentional bias to drug-related cues
in cocaine dependent individuals. Psychopharmacology (2017) 234:2289–2297.


											  *Task*
Participants view pictures of cocaine related and neutral images. Each image has 
2-5 blue lines drawn on it. Participants are asked to indicate the number of lines
by button press.



DATA FILE INFORMATION: 
The default data stored in the data files are:

(1) Raw data file: 'lineCountingTask_raw*.iqdat' (a separate file for each participant)*

build:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 
/StimOrder:						"C->N" vs. "N->C" (the image sequence per run)
								C->N: each run runs 8 cocaine images and then 8 neutral images
								N->C: each run runs 8 neutral images and then 8 cocaine images
/countPracticeRuns:				counts the number of practice sessions run							
/countTestRuns:					counts the number of test runs (there should be 9 runs with 16 stims each, 8 cocaine and 8 neutral)
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/block) 
/cocaineCravingRating:			the rating response for cocaine craving
/Stimulus_Type:					NEUTRAL vs. COCAINE
stimulusitem:					stores the image file presented
/Number_Of_Stripes_In_Stimulus: stores the number of stripes
response: 						the scancode of the key response (44 = Z, 45 = X, 49 = N, 50 = M)
/Correct_Response: 				Z, X, N, M
/Response_Made: 				Z, X, N, M (scancode is translated into response)
correct: 						1 = correct, 0 = error/no response
/Response_Outcome: 				CORRECT, INCORRECT, NONE
/Trial_Outcome: 				CORRECT, WRONG, NO RESPONSE					
/Response_Time: 				response time; measured from onset of image up until response button is hit
								Note: if no response => values.Response_Time = ""
/iti:							the jittered ITI, iti is randomly selected from a normal distribution 
								around parameters.ITI_mean with SD = parameters.ITI_SD (with minimum iti = parameters.ITI_min 
								and maximum iti = parameters.ITI_max)
dropdown.ImageOrder.response:	1 = 'Cocaine -> Neutral'
								2 = 'Neutral -> Cocaine'
								3 = 'Random'

(2) Summary data file: 'lineCountingTask_summary*.iqdat' (a separate file for each participant)*

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/completed:						0 = script was not completed (prematurely aborted); 1 = script was completed (all conditions run)
/countPracticeRuns:				counts the number of practice sessions run		
values.StimOrder:				"C->N" vs. "N->C" (the start of the testing blocks)
/cocaineCravingRating:			the rating response for cocaine craving
/Interference_meanRT_derived: 	the interference score in ms: calculate as 'meanRT_cocaine - meanRT_neutral'
/Interference_medianRT_derived:	the interference score in ms: calculate as 'medianRT_cocaine - medianRT_neutral'
/meanRT_Cocaine: 				mean response time (in ms) of correct responses to cocaine related images
/meanRT_Neutral: 				mean response time (in ms) of correct responses to neutral images
/medianRT_Cocaine: 				median response time (in ms) of correct responses to cocaine related images
/medianRT_Neutral: 				median response time (in ms) of correct responses to neutral images
/propCorrect_Cocaine:			proportion correct responses to cocaine related images
/propCorrect_Neutral:			proportion correct responses to neutral images


* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions


EXPERIMENTAL SET-UP

(1) Cocaine craving Rating on a scale from 1-9

(2) Practice (with feedback): 30 trials with neutral images
- images are selected randomly from the 30 provided practice images
Note: practice session can be repeated as long as the number of practice sessions is below parameters.maxPracticeSessions (default: 2, editable parameters)

(3) Test (no feedback): 9 runs of 16 trials: 8 cocaine and 8 neutral images
(image conditions are presented in blocked format; the starting condition - cocaine vs. neutral- can be selected at start of script)
- images for each condition are selected randomly (without replacement) from the provided pool of 72 cocaine images and
72 neutral images

Response Keys:
z -> 2 stripes
x -> 3 stripes
n -> 4 stripes
m -> 5 stripes


Note: the iti is randomly selected from a normal distribution around parameters.ITI_mean (default: 1750ms) with SD = parameters.ITI_SD
(default: 500ms) and with max itis = parameters.ITI_max (default: 3100ms) and minimum itis = parameters.ITI_min (default: 1100ms)




STIMULI
provided by Dr. James Bjork

INSTRUCTIONS
provided by Dr. James Bjork

EDITABLE CODE:
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code to further customize your experiment.

The parameters you can change are:

/picSize:					proportional (to canvas height) sizing of the images (default: 80%)

/maxPracticeSessions:		maximum number of practice sessions that can be run (default: 2)

/waitDuration:				the duration (in ms) of the wait-trial (default: 2000ms)
/picDuration:				the duration (in ms) of the images (default: 900ms)

Intertrial Interval (in ms) Sampling:
/ITI_mean:					the mean of the normal distribution itis are sampled from (default: 1750ms)
/ITI_SD:					the standard deviation of the normal distribution itis are sampled from (default: 500ms)
/ITI_max:					the maximum iti (default: 3100ms)
/ITI_min:					the minimum iti (default: 1100ms)
Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Privacy Statement | Security Statement | GDPR
Website Security Test