-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalibrate_monitor.py
38 lines (29 loc) · 1.4 KB
/
calibrate_monitor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from psychopy.visual.windowwarp import Warper
from psychopy import visual, core, event
# mywin = visual.Window([608,684],monitor='DLP',screen=1,
# useFBO = True, color='white')
mywin = visual.Window([608,684],monitor='DLP',screen=1,
useFBO = True, color='black', units='norm')
# mywin = visual.Window([608,684],monitor='DLP',screen=0,
# useFBO = True, color='black', units='norm')
warper = Warper(mywin,
# warp='spherical',
warp='warpfile',
warpfile = 'calibratedBallImage.data',
warpGridsize = 300,
eyepoint = [0.5, 0.5],
flipHorizontal = False,
flipVertical = False)
rect1 = visual.Rect(win=mywin, size=(0.1,0.1), pos=[0,0], lineColor=None, fillColor='white',units='norm')
rect2 = visual.Rect(win=mywin, size=(0.1,0.1), pos=[0,-0.5], lineColor=None, fillColor='white',units='norm')
rect3 = visual.Rect(win=mywin, size=(0.1,0.1), pos=[0,0.5], lineColor=None, fillColor='white',units='norm')
rect4 = visual.Rect(win=mywin, size=(0.1,0.1), pos=[0.5,0], lineColor=None, fillColor='white',units='norm')
# circ1 = visual.Circle(win=mywin, size=(0.1,0.1), pos=[0.5, 0.5], lineColor=None, fillColor='white',units='norm')
rect1.draw()
rect2.draw()
rect3.draw()
rect4.draw()
# circ1.draw()
mywin.flip()
event.waitKeys()
mywin.close()