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:  02-24-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-24-2022 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 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:							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. 

Stimulus_Type:					NEUTRAL vs. targetCategory
stimulusitem:					stores the image file presented
Number_Of_Stripes_In_Stimulus: 	stores the number of stripes
Correct_Response: 				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
Response_Outcome: 				CORRECT, INCORRECT, NONE
Trial_Outcome: 					CORRECT, WRONG, NO RESPONSE	
				
Response_Time: 					response time in ms; 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)
									
targetCategoryCravingRating:	the selected rating for the craving of the target substance (1-9)									
								
(2) Summary data file: 'linecountingtask_summary*.iqdat' (a separate file for each participant)*

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)

Interference_meanRT_derived: 	the interference score in ms: calculate as 'meanRT_targetCategory - meanRT_neutral' (Main DV)
									=> positive: it took partipants on average longer to reply to target Category 
									images than to neutral images (attentional bias)
										
Interference_medianRT_derived:	the interference score in ms: calculate as 'medianRT_targetCategory - medianRT_neutral'
										=> positive: it took partipants on average longer to reply to 
										target Category images than to neutral images (attentional bias)

meanRT_targetCategory: 			mean response time (in ms) of correct responses to targetCategory related images
medianRT_targetCategory: 		median response time (in ms) of correct responses to targetCategory related images
meanRT_Neutral: 				mean response time (in ms) of correct responses to neutral images
medianRT_Neutral: 				median response time (in ms) of correct responses to neutral images

propCorrect_targetCategory:		proportion correct responses to targetCategory related images
propCorrect_Neutral:			proportion correct responses to neutral images

propTimeout_targetCategory:		proportion timed-out responses (=no responses) to targetCategory related images
propTimeout_neutral:			proportion timed-out responses (=no responses) to Neutral related 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) 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.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 
___________________________________________________________________________________________________________________	
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:
/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)