Advertisement
Guest User

Untitled

a guest
Jan 15th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. ---
  2. API: 2
  3. OpenSesame: 3.1.0a34
  4. Platform: posix
  5. ---
  6. set width 1024
  7. set uniform_coordinates yes
  8. set title "Extended 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 experiment_path "/home/lotje/.local/share/opensesame_resources/templates"
  19. set description "A template containing a practice and an experimental phase"
  20. set coordinates uniform
  21. set compensation 0
  22. set canvas_backend xpyriment
  23. set bidi yes
  24. set background black
  25.  
  26. define notepad about_this_template
  27. __note__
  28. This template already contains the basic structure of a typical experiment.
  29. It consists of a practice phase, followed by an experimental phase. For more
  30. information, please visit <http://osdoc.cogsci.nl/>
  31. Have fun with OpenSesame!
  32. __end__
  33. set description "Some pointers to help you gest started!"
  34.  
  35. define loop block_loop
  36. set source table
  37. set skip 0
  38. set repeat 5
  39. set order random
  40. set offset no
  41. set item trial_sequence
  42. set description "A single block of trials"
  43. set cycles 1
  44. set continuous no
  45. set column_order ""
  46. set break_if_on_first yes
  47. set break_if never
  48. setcycle 0 empty_column ""
  49. run trial_sequence
  50.  
  51. define sequence block_sequence
  52. set flush_keyboard yes
  53. set description "A sequence containing a single block of trials followed by feedback to the participant"
  54. run reset_feedback always
  55. run block_loop always
  56. run feedback always
  57.  
  58. define sketchpad end_of_experiment
  59. set start_response_interval no
  60. set duration keypress
  61. set description "A sketchpad notifying the participant that the experiment is finished"
  62. 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
  63.  
  64. define sequence experiment
  65. set flush_keyboard yes
  66. set description "The main sequence of the experiment"
  67. run about_this_template always
  68. run experimental_loop always
  69. run end_of_experiment always
  70.  
  71. define loop experimental_loop
  72. set source_file ""
  73. set source table
  74. set skip 0
  75. set repeat 1
  76. set order random
  77. set offset no
  78. set item block_sequence
  79. set description "A loop containing one or more experimental blocks"
  80. set cycles 1
  81. set continuous no
  82. set column_order practice
  83. set break_if_on_first yes
  84. set break_if never
  85. setcycle 0 practice no
  86. run block_sequence
  87.  
  88. define feedback feedback
  89. set reset_variables yes
  90. set duration keypress
  91. set description "Provides feedback to the participant"
  92. 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<br /><br />Your accuracy was [acc]%<br /><br />Press any key to continue" x=0 y=0 z_index=0
  93.  
  94. define form_multiple_choice form_multiple_choice
  95. set timeout infinite
  96. set spacing 10
  97. set question "What is your favorite animal?"
  98. __options__
  99. A dog
  100. A bunny
  101. Other
  102. __end__
  103. set margins "50;50;50;50"
  104. set form_var response
  105. set form_title question
  106. set description "A simple multiple choice item"
  107. set button_text Ok
  108. set allow_multiple yes
  109. set advance_immediately yes
  110. set _theme gray
  111.  
  112. define logger logger
  113. set description "Logs experimental data"
  114. set auto_log yes
  115.  
  116. define inline_script new_inline_script
  117. set description "Executes Python code"
  118. set _run ""
  119. ___prepare__
  120. while True:
  121.  
  122. items.prepare("form_multiple_choice")
  123. items.run("form_multiple_choice")
  124.  
  125. if var.response != "no":
  126. break
  127. __end__
  128.  
  129. define reset_feedback reset_feedback
  130. set description "Resets the feedback variables, such as 'avg_rt' and 'acc'"
  131.  
  132. define sequence trial_sequence
  133. set flush_keyboard yes
  134. set description "A single trial"
  135. run form_multiple_choice never
  136. run new_inline_script always
  137. run logger always
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement