Return to the Face in the Crowd Task page
___________________________________________________________________________________________________________________	

								FACE IN THE CROWD (FITC) DEMO
___________________________________________________________________________________________________________________

Script Author: Millisecond Software, LLC
last updated:  11-11-2019 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 11-11-2019 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	

This script offers example code to 
1) determine the relative coordinates of target locations (->block.determinecoordinates)
2) select locations in an image: FITC task (-> block.fitc)

The default is to run the FITC task. An editable variable (parameters.taskselection) can be set to run either task.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are asked to select target faces in a picture depicting a crowd of people.

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 1 minute to complete

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

(1) Raw data file: 'faceinthecrowd_demo_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
script.sessionid:					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. 
										
target:							the presented stimuli in order of trial presentation
response:						the participant's response
correct:							the correctness of the response
latency: 							the response latency (in ms)

percent_horizontal_targetx:			stores the percent (of canvas) of the horizontal target coordinate	
percent_vertical_targety:			stores the percent (of canvas) of the vertical target coordinate	
percent_response_x:				stores the percent (of canvas) of the x coordinate of the response
percent_response_y:				stores the percent (of canvas) of the x coordinate of the response


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

computer.platform:				the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:					assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:				time it took to run script (in ms); measured from onset to offset of script
script.completed:					0 = script was not completed (prematurely aborted); 
								1 = script was completed (all conditions run)
									
list.ACC.mean:					Overall proportion correct selections
list.RT.mean:						Overall mean latency of correct selections	

___________________________________________________________________________________________________________________	
TASK: DETERMINE THE RELATIVE COORDINATES OF THE TARGET LOCATIONS (->block.determinecoordinates)
___________________________________________________________________________________________________________________

1) Set your canvas under DEFAULTS. This is important as not all monitors are the same size.
Forcing a canvas on each monitor will keep the relative screen positions of the targets the same.

2) Force a picture size to ensure that the picture takes up the same relative canvas location on each monitor

3) create a trial that calculates the relative screen locations by using the x/y-coordinate of the mouse cursor at the end of the trial,
at the time of 'lbuttondown' (trial.determinecoordinates)
Stores the coordinates in the data file.

4) manually fill in the target coordinates into list.hposition and list.vposition under LISTS. Make sure that the index of the
coordinates corresponds to the index of the target image in item.targetfaces.
EXAMPLE: if the target image is 'Face03.jpg' and it is stored under index '/3 = "Face03.jpg"' in item.targetfaces 
then make sure to store the corresponding coordinates as the third items in list.hposition and list.vposition

II) "Face in the Crowd" Task: FITC (-> block.fitc)

___________________________________________________________________________________________________________________	
TASK: FIND PARTICULAR FACES IN A CROWD
___________________________________________________________________________________________________________________

Steps:
1) Make sure the script runs the same /canvassize to run
block.fitc as was used to determine the target coordinates

2) The relative coordinates of the targets are used to define response circles (-> shape.responsecircle).
Check out shape.responsecircle for more details

3) Present these response circles BEFORE the crowd image, so that the crowd image covers response circles on the screen.
(FACE IN THE CROWD MAIN TRIALS-> trial.faceinthecrowd -> stimulusframes)
Note: To check/debug the positions of the response circle: present the response circles AFTER the crowd image
(aka superimpose the circles onto the pictures)

4) Ask participants to click on the target faces in the crowd image. If they click on the underlying
response circles, the response is evaluated as 'correct'; if not the response is evaluated as 'incorrect'.

___________________________________________________________________________________________________________________	
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:

/taskselection:			1 = determine coordinates of the targets and have the coordinates saved as screen percentages in the datafile
						0 = run the task of finding the faces the crowd (FITC) (default)