0

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

user2962635
  • 151
  • 1
  • 4
  • 16
  • There are a lot of convenience functions for converting units. Maybe one of them would work for your use case. See: [http://www.psychopy.org/api/misc.html]. – brittAnderson Jan 13 '16 at 19:10

1 Answers1

1

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

Jon
  • 1,198
  • 7
  • 8