-
Notifications
You must be signed in to change notification settings - Fork 0
/
EyetrackingExample.psyexp
128 lines (128 loc) · 10.3 KB
/
EyetrackingExample.psyexp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" ?>
<PsychoPy2experiment encoding="utf-8" version="2021.2.3">
<Settings>
<Param name="Audio latency priority" updates="None" val="use prefs" valType="str"/>
<Param name="Audio lib" updates="None" val="use prefs" valType="str"/>
<Param name="Completed URL" updates="None" val="" valType="str"/>
<Param name="Data file delimiter" updates="None" val="auto" valType="str"/>
<Param name="Data filename" updates="None" val="u'data/%s_%s_%s' % (expInfo['participant'], expName, expInfo['date'])" valType="code"/>
<Param name="Enable Escape" updates="None" val="True" valType="bool"/>
<Param name="Experiment info" updates="None" val="{'participant':'', 'session':'001'}" valType="code"/>
<Param name="Force stereo" updates="None" val="True" valType="bool"/>
<Param name="Full-screen window" updates="None" val="True" valType="bool"/>
<Param name="HTML path" updates="None" val="" valType="str"/>
<Param name="Incomplete URL" updates="None" val="" valType="str"/>
<Param name="Monitor" updates="None" val="testMonitor" valType="str"/>
<Param name="Resources" updates="None" val="[]" valType="list"/>
<Param name="Save csv file" updates="None" val="False" valType="bool"/>
<Param name="Save excel file" updates="None" val="False" valType="bool"/>
<Param name="Save hdf5 file" updates="None" val="False" valType="bool"/>
<Param name="Save log file" updates="None" val="True" valType="bool"/>
<Param name="Save psydat file" updates="None" val="True" valType="bool"/>
<Param name="Save wide csv file" updates="None" val="True" valType="bool"/>
<Param name="Screen" updates="None" val="1" valType="num"/>
<Param name="Show info dlg" updates="None" val="True" valType="bool"/>
<Param name="Show mouse" updates="None" val="False" valType="bool"/>
<Param name="Units" updates="None" val="height" valType="str"/>
<Param name="Use version" updates="None" val="" valType="str"/>
<Param name="Window size (pixels)" updates="None" val="(1024, 768)" valType="list"/>
<Param name="blendMode" updates="None" val="avg" valType="str"/>
<Param name="color" updates="None" val="$[0,0,0]" valType="color"/>
<Param name="colorSpace" updates="None" val="rgb" valType="str"/>
<Param name="elAddress" updates="None" val="100.1.1.1" valType="str"/>
<Param name="elDataFiltering" updates="None" val="FILTER_LEVEL_2" valType="str"/>
<Param name="elLiveFiltering" updates="None" val="FILTER_LEVEL_OFF" valType="str"/>
<Param name="elModel" updates="None" val="EYELINK 1000 DESKTOP" valType="str"/>
<Param name="elPupilAlgorithm" updates="None" val="ELLIPSE_FIT" valType="str"/>
<Param name="elPupilMeasure" updates="None" val="PUPIL_AREA" valType="str"/>
<Param name="elSampleRate" updates="None" val="1000" valType="num"/>
<Param name="elSimMode" updates="None" val="False" valType="bool"/>
<Param name="elTrackEyes" updates="None" val="RIGHT_EYE" valType="str"/>
<Param name="elTrackingMode" updates="None" val="PUPIL_CR_TRACKING" valType="str"/>
<Param name="expName" updates="None" val="EyetrackingExample" valType="str"/>
<Param name="exportHTML" updates="None" val="on Sync" valType="str"/>
<Param name="eyetracker" updates="None" val="None" valType="str"/>
<Param name="gpAddress" updates="None" val="127.0.0.1" valType="str"/>
<Param name="gpPort" updates="None" val="4242" valType="num"/>
<Param name="logging level" updates="None" val="exp" valType="code"/>
<Param name="mgBlink" updates="None" val="MIDDLE_BUTTON" valType="list"/>
<Param name="mgMove" updates="None" val="CONTINUOUS" valType="str"/>
<Param name="mgSaccade" updates="None" val="0.5" valType="num"/>
<Param name="tbLicenseFile" updates="None" val="" valType="str"/>
<Param name="tbModel" updates="None" val="" valType="str"/>
<Param name="tbSampleRate" updates="None" val="60" valType="num"/>
<Param name="tbSerialNo" updates="None" val="" valType="str"/>
</Settings>
<Routines>
<Routine name="trial">
<TextComponent name="text">
<Param name="color" updates="constant" val="white" valType="color"/>
<Param name="colorSpace" updates="constant" val="rgb" valType="str"/>
<Param name="contrast" updates="constant" val="1" valType="num"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="durationEstim" updates="None" val="" valType="code"/>
<Param name="flip" updates="constant" val="None" valType="str"/>
<Param name="font" updates="constant" val="Open Sans" valType="str"/>
<Param name="languageStyle" updates="None" val="LTR" valType="str"/>
<Param name="letterHeight" updates="constant" val="0.1" valType="num"/>
<Param name="name" updates="None" val="text" valType="code"/>
<Param name="opacity" updates="constant" val="" valType="num"/>
<Param name="ori" updates="constant" val="0" valType="num"/>
<Param name="pos" updates="constant" val="(0, 0)" valType="list"/>
<Param name="saveStartStop" updates="None" val="True" valType="bool"/>
<Param name="startEstim" updates="None" val="" valType="code"/>
<Param name="startType" updates="None" val="time (s)" valType="str"/>
<Param name="startVal" updates="None" val="0.0" valType="code"/>
<Param name="stopType" updates="None" val="duration (s)" valType="str"/>
<Param name="stopVal" updates="constant" val="10.0" valType="code"/>
<Param name="syncScreenRefresh" updates="None" val="True" valType="bool"/>
<Param name="text" updates="constant" val="This text could be a snippet" valType="str"/>
<Param name="units" updates="None" val="from exp settings" valType="str"/>
<Param name="wrapWidth" updates="constant" val="" valType="num"/>
</TextComponent>
</Routine>
<Routine name="Start_Eyetracking">
<CodeComponent name="code">
<Param name="Before Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Before JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Experiment" updates="constant" val="use_eyetracker = False&#10;logger = None&#10;&#10;if use_eyetracker==True:&#10; from base_functionalities.logger import Logger&#10; # path where to save the data&#10; logger = Logger("C:\\Eyetracking\\EyetrackingData.csv")&#10; &#10; # use for gaze point in user coordinate system&#10; logger.add_key_to_log('left_gaze_point_in_user_coordinate_system')&#10; logger.add_key_to_log('right_gaze_point_in_user_coordinate_system')&#10; &#10; # use for recording if the eyepositiong is valid&#10; logger.add_key_to_log('left_gaze_point_validity')&#10; logger.add_key_to_log('right_gaze_point_validity')&#10; &#10; # use for gaze point in origin user coordinate system&#10; logger.add_key_to_log('left_gaze_origin_in_user_coordinate_system')&#10; logger.add_key_to_log('right_gaze_origin_in_user_coordinate_system')&#10; &#10; # use for gazepoint in display area&#10; logger.add_key_to_log('left_gaze_point_on_display_area')&#10; logger.add_key_to_log('right_gaze_point_on_display_area')&#10; &#10; # use for system time&#10; logger.add_key_to_log('system_time_stamp')&#10; &#10; # use for pupil diameter recording&#10; logger.add_key_to_log('left_pupil_diameter')&#10; logger.add_key_to_log('right_pupil_diameter')&#10; &#10;if use_eyetracker==True:&#10; # start the recording&#10; logger.start_recording()" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="Py" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="End Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code" valType="code"/>
</CodeComponent>
</Routine>
<Routine name="End_Eyetracking">
<CodeComponent name="code_2">
<Param name="Before Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Before JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Experiment" updates="constant" val="if use_eyetracker == True:&#10; # end the recording session&#10; logger.stop_recording()" valType="extendedCode"/>
<Param name="Begin JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Begin Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="Code Type" updates="None" val="Py" valType="str"/>
<Param name="Each Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="Each JS Frame" updates="constant" val="" valType="extendedCode"/>
<Param name="End Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Experiment" updates="constant" val="" valType="extendedCode"/>
<Param name="End JS Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="End Routine" updates="constant" val="" valType="extendedCode"/>
<Param name="disabled" updates="None" val="False" valType="bool"/>
<Param name="name" updates="None" val="code_2" valType="code"/>
</CodeComponent>
</Routine>
</Routines>
<Flow>
<Routine name="Start_Eyetracking"/>
<Routine name="trial"/>
<Routine name="End_Eyetracking"/>
</Flow>
</PsychoPy2experiment>