Data relates to a visual-psychophysics experiment ran in psychopy.  The data was collected in Novemeber and December 2023.  However, there is currently only partial data for one of the participants (pt2), with further data to come.  

This is a 2AFC flow-parsing task where participants judge the direction of a moving target, against a moving background.  A moving target is breifly presented in one of four known locations.  Participants press a key to indicate whether the target was moving inward (towards the middle of the screen) or outward (towards the edge of the screen).  The background is an array of ~1000 dots which move in an expanding or contracting pattern to simulate forwards or backwards self-motion.  Staircase proceedures adjust the speed of the target, in the opposite direction to the response.  That is, if the participant incorrectly perceives the direction of travel, it will maintain the same direction, but speed up.  If the participant correctly perceives the direction of travel, it will slow down, or if close to zero, it will cross zero to move in the opposite direction.  The main manipulation is direction of the background motion (contracting or expanding).  There are six target durations from 16 to 116ms, giving 12 conditions in total.  (The target durations correspond to the target presentation times including the interstimulus-interval from the target-detection and missing-target--detection tasks, apart fom the concurrent condition in those experiments).  The target always moves in the opposite direction to the background in the first trial.  There are 25 trials per conditions.   A full set of data is 12 runs of the experiment.

Analysis fits a psychometric function to the 25 trials from each condition to estimate the point of subjective equality (target speed where participants are equally likely to give and inward or outward response).  

When a participant has complete 12 runs of the experiment, we calculate trimmed means (e.g., the 2 highest and lowest values are removed and the mean of the remaining eight values is calculated).  Four of the 5 participants here have completed 12 runs, and their results csvs are labelled with TM2 (trimmed means), pt2 has had no values trimmed from their data.

 
Experimental data was collected by running Direction_detection_Dec23.py.  This script calls kestenSTmaxVal.py, an adaptive staircase procedure sets the luminance levels.  To run this script you will also need psychopy, which can be downloaded from https://www.psychopy.org/download.html. You will need to enter your monitor details into psychopy's monitor centre. 

Data is analysed with the run_analysis.py script.  To fit the psychometric curves you will need psignifit which can be downloaded from https://github.com/wichmann-lab/python-psignifit/wiki/Install.


