thartbm / PyVMEC

A Python-based GUI to create and run visuo-motor experiments.
GNU General Public License v3.0
1 stars 3 forks source link

home arrow error-clamps / no-cursor trials doesn't work #45

Closed thartbm closed 6 years ago

thartbm commented 6 years ago

The arrow symbol that is shown at the home position on the return to home during no-cursor and error-clamp trials should point to roughly the direction where the cursor is, but it always points to the left. So this does not help people get back to the home position.

thartbm commented 6 years ago

In the Matlab VMEC the angle is calculated on line 223 of runStimulus.m:

arrow_angle = ((fix((mod(theta,2*pi)/(2*pi)) * 8) / 8) * (2*pi)) + ((2*pi)/8/2)

Where theta is the angle of the actual mouse position relative to home (in radians). The idea is that it is rounded down to the nearest multiple of 360 degrees divided into 8 steps = 45 degrees, and then we add 22.5 degrees ((2*pi)/8/2) so that it is never at the cardinal directions (0, 90, 180, 270). In PsychoPy you can set the orientation of a a visual stimulus object with its ori property, which is in degrees (not radians).

I think, if you get theta as an angle in degrees, the ori of the arrow should be set to:

(round((theta-22.5)/45) * 45) + 22.5

See how we get some impoverished feedback on where the mouse is with this line of python code:

[(round((theta-22.5)/45) * 45) + 22.5 for theta in range(0,181,10)]