user2962635
user2962635

Reputation: 151

Using PsychoPy changing origin coordinate

I am trying to make a program that gets Pen coordinate from wacom tablet which I manage to figure out using this:

data = display.Display().screen().root.query_pointer()._data
X = data["root_x"]-cfg['winpos'][0]-(cfg['width']/2)
Y = cfg['height']-(data["root_y"]-cfg['winpos'][1])-(cfg['height']/2)
print "Pen Position is: ", X, Y

but problem is that Psychopy has origin coordinate for screen at the centre please refer to pic:Default origin right now

and i am using a wacom INTUOS PTZ1230 12" 12" tablet which i want (0, 0) to start from regular monitor origin from top refer to second pic. i want (coordinate to start like this

very long to read but all i need is to change my coordinate system in python using psychopy. thanks any bit helps

Upvotes: 0

Views: 643

Answers (1)

Jon
Jon

Reputation: 1223

Experimenters generally present their stimuli symetrically around the center of the screen so, although top left and bottom left are (both) more conventional for the origin, the center of the screen makes most sense for scientists.

The window does have atributes viewScale and viewPos though. Although they aren't designed quite for this purpose I think you could use viewPos to shift the origin.

Jon

Upvotes: 1

Related Questions