Advertisement
Guest User

Astn Cogsci Forum

a guest
Jan 22nd, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. ---
  2. API: 2
  3. OpenSesame: 3.1.4b1
  4. Platform: posix
  5. ---
  6. set width 1024
  7. set uniform_coordinates no
  8. set title "New experiment"
  9. set synth_backend legacy
  10. set subject_parity even
  11. set subject_nr 0
  12. set start experiment
  13. set sound_sample_size -16
  14. set sound_freq 48000
  15. set sound_channels 2
  16. set sound_buf_size 1024
  17. set sampler_backend legacy
  18. set round_decimals 2
  19. set mouse_backend psycho
  20. set keyboard_backend psycho
  21. set height 768
  22. set fullscreen no
  23. set form_clicks no
  24. set foreground white
  25. set font_underline no
  26. set font_size 18
  27. set font_italic no
  28. set font_family mono
  29. set font_bold no
  30. set experiment_path "/home/eeg/Desktop/EEG related"
  31. set disable_garbage_collection yes
  32. set description "Default description"
  33. set coordinates relative
  34. set compensation 0
  35. set color_backend psycho
  36. set clock_backend psycho
  37. set canvas_backend psycho
  38. set bidi no
  39. set background black
  40.  
  41. define inline_script _inline_script
  42. set description "Executes Python code"
  43. ___run__
  44. # The random function randint() returns a random integer between a certain
  45. # minimum and maximum value:
  46. random_time = random.randint(1000,1500)
  47.  
  48. # To set the variable for future use in the interface, the name of variable should
  49. # be a string (i.e. put between quotes), whereas the value should not:
  50. self.experiment.set("random_delay", random_time)
  51. __end__
  52. set _prepare ""
  53.  
  54. define logger event_log
  55. set use_quotes no
  56. set ignore_missing no
  57. set description "Logs experimental data"
  58. set auto_log no
  59. log start
  60. log category
  61. log number
  62. log time_experiment_started
  63. log count_experiment_started
  64. log random_delay
  65. log time_event_log
  66. log count_event_log
  67. log time_experiment
  68. log count_experiment
  69. log time_start_connection
  70. log count_start_connection
  71. log time_fixation
  72. log count_fixation
  73. log time_target
  74. log count_target
  75.  
  76. define sequence experiment
  77. set flush_keyboard yes
  78. set description "Runs a number of items in sequence"
  79. run inline_script always
  80. run welcome always
  81. run face_house_loop always
  82. run feedback always
  83.  
  84. define loop face_house_loop
  85. set source_file ""
  86. set source table
  87. set repeat 6
  88. set order random
  89. set item face_house_sequence
  90. set description "Repeatedly runs another item"
  91. set cycles 32
  92. set continuous no
  93. set column_order "category;number"
  94. set break_if_on_first yes
  95. set break_if never
  96. setcycle 0 category face
  97. setcycle 0 number 1
  98. setcycle 1 category face
  99. setcycle 1 number 2
  100. setcycle 2 category face
  101. setcycle 2 number 3
  102. setcycle 3 category face
  103. setcycle 3 number 4
  104. setcycle 4 category face
  105. setcycle 4 number 5
  106. setcycle 5 category face
  107. setcycle 5 number 6
  108. setcycle 6 category face
  109. setcycle 6 number 7
  110. setcycle 7 category face
  111. setcycle 7 number 8
  112. setcycle 8 category face
  113. setcycle 8 number 9
  114. setcycle 9 category face
  115. setcycle 9 number 10
  116. setcycle 10 category face
  117. setcycle 10 number 11
  118. setcycle 11 category face
  119. setcycle 11 number 12
  120. setcycle 12 category face
  121. setcycle 12 number 13
  122. setcycle 13 category face
  123. setcycle 13 number 14
  124. setcycle 14 category face
  125. setcycle 14 number 15
  126. setcycle 15 category face
  127. setcycle 15 number 16
  128. setcycle 16 category car
  129. setcycle 16 number 1
  130. setcycle 17 category car
  131. setcycle 17 number 2
  132. setcycle 18 category car
  133. setcycle 18 number 3
  134. setcycle 19 category car
  135. setcycle 19 number 4
  136. setcycle 20 category car
  137. setcycle 20 number 5
  138. setcycle 21 category car
  139. setcycle 21 number 6
  140. setcycle 22 category car
  141. setcycle 22 number 7
  142. setcycle 23 category car
  143. setcycle 23 number 8
  144. setcycle 24 category car
  145. setcycle 24 number 9
  146. setcycle 25 category car
  147. setcycle 25 number 10
  148. setcycle 26 category car
  149. setcycle 26 number 11
  150. setcycle 27 category car
  151. setcycle 27 number 12
  152. setcycle 28 category car
  153. setcycle 28 number 13
  154. setcycle 29 category car
  155. setcycle 29 number 14
  156. setcycle 30 category car
  157. setcycle 30 number 15
  158. setcycle 31 category car
  159. setcycle 31 number 16
  160. run face_house_sequence
  161.  
  162. define sequence face_house_sequence
  163. set flush_keyboard yes
  164. set description "Runs a number of items in sequence"
  165. run fixation always
  166. run target always
  167. run new_inline_script always
  168. run new_advanced_delay always
  169. run event_log always
  170. run _inline_script always
  171.  
  172. define feedback feedback
  173. set reset_variables yes
  174. set duration keypress
  175. set description "Provides feedback to the participant"
  176.  
  177. define sketchpad fixation
  178. set start_response_interval no
  179. set reset_variables no
  180. set duration "[random_delay]"
  181. set description "Displays stimuli"
  182. set background black
  183. draw line color=grey penwidth=1 show_if=always x1=0 x2=0 y1=-46 y2=-14 z_index=1
  184. draw line color=grey penwidth=1 show_if=always x1=-16 x2=16 y1=-30 y2=-30 z_index=1
  185.  
  186. define inline_script inline_script
  187. set description "Executes Python code"
  188. ___run__
  189. # Import the Python module random:
  190. import random
  191.  
  192. # The random function randint() returns a random integer between a certain
  193. # minimum and maximum value:
  194. random_time = random.randint(500,750)
  195.  
  196. # To set the variable for future use in the interface, the name of variable should
  197. # be a string (i.e. put between quotes), whereas the value should not:
  198. self.experiment.set("random_delay", random_time)
  199. __end__
  200. set _prepare ""
  201.  
  202. define advanced_delay new_advanced_delay
  203. set jitter_mode Uniform
  204. set jitter 0
  205. set duration 250
  206. set description "Waits for a specified duration"
  207.  
  208. define inline_script new_inline_script
  209. set description "Executes Python code"
  210. ___run__
  211. from datetime import datetime
  212. var.my_system_time = datetime.now().strftime('%d-%m-%y %H:%M:%f')
  213. __end__
  214. set _prepare ""
  215.  
  216. define sketchpad target
  217. # draw line 0 -16 0 16 color="grey" penwidth=1 z_index=1 show_if="always"
  218. # draw line -16 0 16 0 color="grey" penwidth=1 z_index=1 show_if="always"
  219. set start_response_interval no
  220. set reset_variables no
  221. set duration 0
  222. set description "Displays stimuli"
  223. set background black
  224. draw image center=1 file="[category]_[number].png" scale=0.5 show_if=always x=0 y=0 z_index=2
  225. draw line color=grey penwidth=1 show_if=always x1=0 x2=0 y1=-46 y2=-16 z_index=1
  226. draw line color=grey penwidth=1 show_if=always x1=-16 x2=16 y1=-30 y2=-30 z_index=1
  227.  
  228. define sketchpad welcome
  229. set start_response_interval no
  230. set reset_variables no
  231. set duration keypress
  232. set description "Displays stimuli"
  233. draw textline center=1 color=white font_bold=no font_family=serif font_italic=no font_size=32 html=yes show_if=always text="OpenSesame 2.9.7 <i>Hesitant Heisenberg</i>" x=0 y=0 z_index=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement