User Manual: Inquisit Line Counting Task


___________________________________________________________________________________________________________________	

										Line Counting Task
___________________________________________________________________________________________________________________	

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

Script Copyright © 08-03-2023 Millisecond Software

This task has been generously made available to the Millisecond Script Library by Dr. James Bjork.

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements a line counting task, an attentional bias task with target images.

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

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants view pictures of targetCategory (here: 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.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 8 minutes to complete

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________	
The fields in the data files are:

(1) Raw data file: 'linecountingtask_raw*.iqdat'*

build:							The specific Inquisit version used (the 'build') that was run
computer.platform:				the platform the script was run on (win/mac/ios/android)
date, time: 					date and time script was run 
subject, group, 				with the current subject/groupnumber
session:						with the current session id

stimOrder:						"C->N" vs. "N->C" (the image sequence per run)
								C->N: each run runs 8 targetCategory images and then 8 neutral images
								N->C: each run runs 8 neutral images and then 8 targetCategory 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 targetCategory and 8 neutral)

blockCode, blockNum:			the name and number of the current block (built-in Inquisit variable)
trialCode, trialNum: 			the name and number of the currently recorded trial (built-in Inquisit variable)
									Note: trialNum is a built-in Inquisit variable; it counts all trials run; even those
									that do not store data to the data file such as feedback trials. Thus, trialNum 
									may not reflect the number of main trials run per block. 

stimulusType:					NEUTRAL vs. targetCategory
stimulusItem:					stores the image file presented
numberOfStripesInStimulus: 	stores the number of stripes
correctResponse: 				Z, X, N, M
response: 						the scancode of the key response (44 = Z, 45 = X, 49 = N, 50 = M)
responseText: 					for test trials: the character key that was pressed -> Z, X, N, M
correct: 						1 = correct, 0 = error/no response
responseOutcome: 				CORRECT, INCORRECT, NONE
trialOutcome: 					CORRECT, WRONG, NO RESPONSE	
				
responseTime: 					response time in ms; measured from onset of image up until response button is hit
									Note: if no response => values.responseTime = ""
										
iti:							the jittered ITI, iti is randomly selected from a normal distribution 
								around parameters.itiMean with SD = parameters.itiStd (with minimum iti = parameters.itiMin 
								and maximum iti = parameters.itiMax)
									
targetCategoryCravingRating:	the selected rating for the craving of the target substance (1-9)									
								
(2) Summary data file: 'linecountingtask_summary*.iqdat'*

inquisit.version:				Inquisit version run
computer.platform:				the platform the script was run on (win/mac/ios/android)
startDate:						date script was run
startTime:						time script was started
subjectId:						assigned subject id number
groupId:						assigned group id number
sessionId:						assigned session id number
elapsedTime:					time it took to run script (in ms); measured from onset to offset of script
completed:						0 = script was not completed (prematurely aborted); 
								1 = script was completed (all conditions run)
								
targetCategoryCravingRating:	the selected rating for the craving of the target substance (1-9)									
									
countPracticeRuns:				counts the number of practice sessions run		
stimOrder:						"C->N" vs. "N->C" (the start of the testing blocks)

interferenceMeanRTDerived: 		the interference score in ms: calculate as 'meanRTTargetCategory - meanRTNeutral' (Main DV)
									=> positive: it took partipants on average longer to reply to target Category 
									images than to neutral images (attentional bias)
										
interferenceMedianRTDerived:	the interference score in ms: calculate as 'medianRTTargetCategory - medianRTNeutral'
										=> positive: it took partipants on average longer to reply to 
										target Category images than to neutral images (attentional bias)

meanRTTargetCategory: 			mean response time (in ms) of correct responses to targetCategory related images
medianRTTargetCategory: 		median response time (in ms) of correct responses to targetCategory related images
meanRTNeutral: 					mean response time (in ms) of correct responses to neutral images
medianRTNeutral: 				median response time (in ms) of correct responses to neutral images

propCorrectTargetCategory:		proportion correct responses to targetCategory related images
propCorrectNeutral:				proportion correct responses to neutral images

propTimeoutTargetCategory:		proportion timed-out responses (=no responses) to targetCategory related images
propTimeoutNeutral:				proportion timed-out responses (=no responses) to Neutral related images


___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________

(1) Cravings Rating

(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 targetCategory and 8 neutral images
(image conditions are presented in blocked format; the starting condition - targetCategory vs. neutral- is selected
based on groupnumber:
groupnumber 1: target category -> neutral (C->N)
groupnumber 2: neutral -> target category (N->C)

- images for each condition are selected randomly (without replacement) from the provided pool 
of 72 targetCategory 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.itiMean (default: 1750ms) with SD = parameters.itiStd
(default: 500ms) and with max itis = parameters.itiMax (default: 3100ms) and minimum itis = parameters.itiMin (default: 1100ms)

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
provided by Dr. James Bjork 

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
see section Editable Instructions 

___________________________________________________________________________________________________________________	
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:
/iTiMean:					the mean of the normal distribution itis are sampled from (default: 1750ms)
/itiStd:					the standard deviation of the normal distribution itis are sampled from (default: 500ms)
/itiMax:					the maximum iti (default: 3100ms)
/itiMin:					the minimum iti (default: 1100ms)