User Manual: Inquisit Staircase Method


___________________________________________________________________________________________________________________	

				DIFFERENCE THRESHOLD: Interweaved Staircase Method (Example: determine difference threshold for a red)
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 03-26-2014
last updated:  02-21-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-21-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the interweaved STAIRCASE METHOD to estimate the difference threshold for a particular color red

Reference: 
Ehrenstein, W.H. & and Addie Ehrenstein, A. (1999). Psychophysical Methods. In U. Windhorst & H. Johansson, Hakan (Eds.), 
Modern Techniques in Neuroscience Research (pp.1211-1241). Heidelberg: Springer.
(->http://uni-leipzig.de/~isp/isp/history/texts/PSYPHY-M.PDF)

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
In the staircase procedure, participants are asked repeatedly whether a red Target color is lighter or darker than 
a red base color.
 
For example: the red component of the target color is lighter. As long as participants say the target 
red is lighter than the base red, the target red gets adjusted down by a preestablished step size (editable
value). Once participants reverse their answer (and say it's darker), the adjustment reverses and the 
the target color is turned up lighter by the preestablished step size. The reversal threshold = average of the 
last two target red values before reversal (e.g. one perceived lighter and one perceived darker than baseline) gets
noted. Once a predetermined number of reversals has taken place (parameters.max_reversals) the difference
threshold is calculated as the mean of all the obtained reversal thresholds.

Interweaved staircase method: two staircases are run at the same time. One staircase starts with a lighter
red target (= staircase DOWN), the other staircase starts with a darker red target (= staircase UP)
The individual trials of each staircase are either called in a random or in an alternate fashion 
(-> parameters.staircase_order).
The purpose of the interweaved staircase method is to somewhat obscure the nature of the procedure.

In general, the staircase procedure is considered a variant of the Method of Limits with the difference that 
once a participant changes the response (e.g. from "it's lighter" to "it's darker") the threshold estimation 
isn't over but the adjustments are reversed and a predetermined number of reveral thresholds are noted 
=> the threshold gets crossed several times.

By default, this script runs one cycle: one up and one down staircase interweaved

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

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

(1) Raw data file: 'staircasemethod_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

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. 

staircase:							1 = staircase DOWN; 
									2 = staircase UP
direction_down								
Direction_ DOWN:					1 = target lighter; 
									2 = target darker for staircase DOWN
								
direction_up:						1 = target lighter; 
									2 = target darker for staircase UP
									
baseline_value:						stores the red color target tone of the current base
targetvalue_down:					stores the red color target tone of the current target Color in the DOWN staircase
targetvalue_up:						stores the red color target tone of the current target Color in the UP 

response:							the participant's response (scancode of response)
latency: 							the response latency

countreversals_down:				count number of direction reversal for staircase DOWN
countreversals_up:					count number of direction reversal for staircase UP
ReversalThreshold:					estimated Threshold at Reversal point (midpoint between last two target values)

diffthreshold_down:					mean reversal thresholds for current UP Staircase 
									(thresholds: midpoint between the last two target values before reversal response)
								
diffthreshold_up:					mean reversal thresholds for current DOWN Staircase 
									(thresholds: midpoint between the last two target values before reversal response)
								
diffthreshold:						mean threshold (based on current DiffThreshold_up and DiffThreshold_Down) for the current cycle


(2) Summary data file: 'staircasemethod_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)

cycles:								stores the number of staircase cycles run

staircase_order:					select from "alternate" (default) or "random"
									alternate: staircase up and staircase alternate (until one of the staircases has reached the max. number of reversals)
									random: staircases are selected randomly (until one of the staircases has reached the max. number of reversals)

step:								the stepsize with which the target color increases/decreases (default: 2)

initialdifference:					initial difference in the red component of target and base (default: 50+1 = 51)
									Note: in this script the initial difference is selected in such a way that the
									adjusted targetvalues are always either above or below baseline.
									
baselinevalue1:						the baseline_value of the first "limits" cycle

diffthreshold1:						stores the Difference Threshold of the first cycle
									Note: by design, this script only runs one cycle
								
___________________________________________________________________________________________________________________	
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:

/responsekey_lighter -
/responsekey_darker:				the response key assignments (scancodes and labels)

/baselinevalue1:					the baseline value (0 -> black, 255 -> brightest red)
									Note: to add further staircase cycles with different basevalues
									add a value for each new baseline value you want to test and go to
									BLOCKS for further instructions.

/step:								the stepsize with which the target color increases/decreases (default: 2)

/initialdifference:					initial difference in the red component of target and base (default: 50+1 = 51)
									Note: in this script the initial difference is selected in such a way that the
									targetvalues are always either above or below baseline.

/max_reversals:						the maximum number of reversals per staircase

/staircase_order:					select from "alternate" (default) or "random"
									alternate: staircase up and staircase alternate (until one of the staircases has reached the max. number of reversals)
									random: staircases are selected randomly (until one of the staircases has reached the max. number of reversals)