What the code does
This demo will show you how to get an orientation threshold using a two alternative forced choice experiment, with the method of constant stimuli. A Gabor patch will appear randomly either above or below the central fixation point. You need to respond if the Gabor is tilted to the left or right. You make this response with the left and right arrow keys. Press the escape key to exit.