-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFixation.py
47 lines (36 loc) · 1.11 KB
/
Fixation.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
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fixation
Simply shows a fixation cross for a set amount of time
"""
# import necessary libraries & functions
from psychopy import visual, core, event
######################
# CHANGE PARAMETERS #
######################
RestDuration = 600
end_exp_key = 'escape'
#######
# RUN #
#######
globalClock = core.Clock() # to track the time since experiment started
# Set-up the Window
win = visual.Window(
size=(1440, 900), fullscr=True, screen=0,
allowGUI=False, allowStencil=False,
monitor='testMonitor', color=[0, 0, 0], colorSpace='rgb',
blendMode='avg', useFBO=True)
# Display Fixation
rest = visual.TextStim(win=win, name='rest',
text=u'+',
font=u'Arial',
pos=(0, 0), height=0.5, wrapWidth=None, ori=0,
color=u'white', colorSpace='rgb', opacity=1,
alignHoriz='center', depth=0.0)
rest.draw()
win.flip()
event.waitKeys(maxWait=RestDuration, keyList=['escape'], timeStamped=False)
# make sure everything is closed down
win.close()
core.quit()