Alessandra_Z

Untitled

Jan 4th, 2016
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.31 KB | None | 0 0
  1. ---
  2. API: 2
  3. OpenSesame: 3.0.4
  4. Platform: nt
  5. ---
  6. set width 1024
  7. set uniform_coordinates "yes"
  8. set title "PyGaze eye-tracking template"
  9. set subject_parity "even"
  10. set subject_nr 0
  11. set start "experiment"
  12. set height 768
  13. set foreground "white"
  14. set font_size 18
  15. set font_italic "no"
  16. set font_family "mono"
  17. set font_bold "no"
  18. set description "A template for eye-tracking experiments"
  19. set coordinates "relative"
  20. set compensation 0
  21. set canvas_backend "xpyriment"
  22. set bidi "yes"
  23. set background "black"
  24.  
  25. define notepad about_this_template
  26. __note__
  27. Hi,
  28. This template already contains the basic structure needed for a typical
  29. eye-tracking experiment, consisting of a practice phase, followed by an
  30. experimental phase.
  31. For more information, please refer to the website:
  32. <http://www.cogsci.nl/opensesame>
  33. Have fun with OpenSesame!
  34. --
  35. Sebastiaan
  36. __end__
  37. set description "Some pointers to help you gest started!"
  38.  
  39. define loop block_loop
  40. set skip 0
  41. set repeat 1
  42. set order "random"
  43. set offset "no"
  44. set item "trial_sequence"
  45. set description "A single block of trials"
  46. set cycles 3
  47. set column_order "item_number"
  48. set break_if "never"
  49. setcycle 0 item_number "14"
  50. setcycle 1 item_number "18"
  51. setcycle 2 item_number "34"
  52. run trial_sequence
  53.  
  54. define sequence block_sequence
  55. set flush_keyboard "yes"
  56. set description "A sequence containing a single block of trials followed by feedback to the participant"
  57. run reset_feedback always
  58. run block_loop always
  59. run feedback always
  60.  
  61. define sampler context
  62. set volume 1
  63. set stop_after 0
  64. set sample "sentences/filler[item_number]_ctxt.ogg"
  65. set pitch 1
  66. set pan 0
  67. set fade_in 0
  68. set duration "sound"
  69. set description "Plays a sound file in .wav or .ogg format"
  70.  
  71. define sketchpad end_of_experiment
  72. set start_response_interval "no"
  73. set duration "keypress"
  74. set description "A sketchpad notifying the participant that the experiment is finished"
  75. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Press any key to exit" x=0 y=0 z_index=0
  76.  
  77. define sketchpad end_of_practice
  78. set start_response_interval "no"
  79. set duration "keypress"
  80. set description "A sketchpad notifying the participant that the practice phase is finished"
  81. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Press any key to continue" x=0 y=0 z_index=0
  82.  
  83. define sequence experiment
  84. set flush_keyboard "yes"
  85. set description "The main sequence of the experiment"
  86. run pygaze_init always
  87. run instructions always
  88. run practice_loop always
  89. run end_of_practice always
  90. run experimental_loop always
  91. run end_of_experiment always
  92.  
  93. define loop experimental_loop
  94. set skip 0
  95. set repeat 1
  96. set order "random"
  97. set offset "no"
  98. set item "block_sequence"
  99. set description "A loop containing one or more experimental blocks"
  100. set cycles 1
  101. set column_order "practice"
  102. set break_if "never"
  103. setcycle 0 practice "no"
  104. run block_sequence
  105.  
  106. define feedback feedback
  107. set reset_variables "yes"
  108. set duration "keypress"
  109. set description "Provides feedback to the participant"
  110. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Your average response time was [avg_rt]ms" x=0 y=-96 z_index=0
  111. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Press any key to continue" x=0 y=32 z_index=0
  112. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Your accuracy was [acc]%" x=0 y=-32 z_index=0
  113.  
  114. define sketchpad fix_dot
  115. set duration "keypress"
  116. set description "Displays stimuli"
  117. draw fixdot color=white show_if=always style=default x=0 y=0 z_index=0
  118.  
  119. define sketchpad instructions
  120. set start_response_interval "no"
  121. set duration "keypress"
  122. set description "A sketchpad containing the instructions for the participant"
  123. draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text="Press any key to begin!" x=0 y=0 z_index=0
  124.  
  125. define keyboard_response keyboard_response
  126. set timeout "infinite"
  127. set flush "yes"
  128. set duration "keypress"
  129. set description "Collects keyboard responses"
  130.  
  131. define logger logger
  132. set description "Logs experimental data"
  133. set auto_log "yes"
  134.  
  135. define sampler new_sampler
  136. set volume 1
  137. set stop_after 0
  138. set sample "Silence.ogg"
  139. set pitch 1
  140. set pan 0
  141. set fade_in 0
  142. set duration "sound"
  143. set description "Plays a sound file in .wav or .ogg format"
  144.  
  145. define sampler new_sampler_1
  146. set volume 1
  147. set stop_after 0
  148. set sample "Silence.ogg"
  149. set pitch 1
  150. set pan 0
  151. set fade_in 0
  152. set duration "sound"
  153. set description "Plays a sound file in .wav or .ogg format"
  154.  
  155. define loop practice_loop
  156. set skip 0
  157. set repeat 1
  158. set order "random"
  159. set offset "no"
  160. set item "block_sequence"
  161. set description "A loop containing one or more practice blocks"
  162. set cycles 1
  163. set column_order "practice"
  164. set break_if "never"
  165. setcycle 0 practice "yes"
  166. run block_sequence
  167.  
  168. define pygaze_drift_correct pygaze_drift_correct
  169. set ypos 0
  170. set xpos 0
  171. set target_style "small-cross"
  172. set target_color "[foreground]"
  173. set fixation_triggered "no"
  174. set draw_target "yes"
  175. set description "Perform eye-tracker drift correction"
  176.  
  177. define pygaze_init pygaze_init
  178. set tracker_type "Simple dummy"
  179. set smi_send_port 4444
  180. set smi_recv_port 5555
  181. set smi_ip "127.0.0.1"
  182. set sacc_vel_thr 35
  183. set sacc_acc_thr 9500
  184. set eyelink_pupil_size_mode "area"
  185. set eyelink_force_drift_correct "yes"
  186. set description "Initialize and calibrate eye tracker"
  187. set calibrate "yes"
  188. set calbeep "yes"
  189. set _logfile "automatic"
  190.  
  191. define pygaze_log pygaze_log
  192. set throttle 2
  193. set msg ""
  194. set description "Writes information to the eye-tracker logfile"
  195. set auto_log "yes"
  196.  
  197. define pygaze_start_recording pygaze_start_recording
  198. set status_msg "start_trial [count_trial_sequence]"
  199. set description "Puts the eye tracker into recording mode"
  200.  
  201. define pygaze_stop_recording pygaze_stop_recording
  202. set status_msg "stop_trial"
  203. set description "Stops recording of eye tracking data"
  204.  
  205. define reset_feedback reset_feedback
  206. set description "Resets the feedback variables, such as 'avg_rt' and 'acc'"
  207.  
  208. define sketchpad scene
  209. set duration 0
  210. set description "Displays stimuli"
  211. draw image center=1 file="scenes/filler[item_number].bmp" scale=1 show_if=always x=0 y=0 z_index=0
  212.  
  213. define sketchpad sketchpad
  214. set start_response_interval "no"
  215. set duration 0
  216. set description "Displays stimuli"
  217. draw fixdot color=white show_if=always style=default x=0 y=0 z_index=0
  218.  
  219. define sampler target
  220. set volume 1
  221. set stop_after 0
  222. set sample "sentences/filler[item_number]_filler_target.ogg"
  223. set pitch 1
  224. set pan 0
  225. set fade_in 0
  226. set duration "sound"
  227. set description "Plays a sound file in .wav or .ogg format"
  228.  
  229. define sequence trial_sequence
  230. set flush_keyboard "yes"
  231. set description "A single trial"
  232. run pygaze_drift_correct always
  233. run pygaze_start_recording always
  234. run fix_dot always
  235. run scene always
  236. run context always
  237. run target always
  238. run sketchpad always
  239. run keyboard_response always
  240. run logger always
  241. run pygaze_log always
  242. run pygaze_stop_recording always
Advertisement
Add Comment
Please, Sign In to add comment