Advertisement
Guest User

Untitled

a guest
Mar 16th, 2013
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 KB | None | 0 0
  1. # Generated by OpenSesame 0.27.2~pre1 (Frisky Freud)
  2. # Sat Mar 16 22:19:56 2013 (posix)
  3. # <http://www.cogsci.nl/opensesame>
  4.  
  5. set foreground "white"
  6. set subject_parity "even"
  7. set font_size "18"
  8. set description "A template containing a practice and an experimental phase"
  9. set title "Extended template"
  10. set start "experiment"
  11. set font_bold "no"
  12. set coordinates "relative"
  13. set height "768"
  14. set mouse_backend "legacy"
  15. set width "1024"
  16. set compensation "0"
  17. set sampler_backend "legacy"
  18. set keyboard_backend "legacy"
  19. set background "black"
  20. set subject_nr "0"
  21. set canvas_backend "legacy"
  22. set font_family "mono"
  23. set synth_backend "legacy"
  24. set font_italic "no"
  25.  
  26. define feedback feedback
  27. set duration "500"
  28. set reset_variables "yes"
  29. set description "Provides feedback to the participant"
  30. draw textline 0.0 0.0 "X" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  31.  
  32. define loop block_loop
  33. set repeat "1"
  34. set description "A single block of trials"
  35. set skip "0"
  36. set offset "no"
  37. set item "trial_sequence"
  38. set column_order "correct_response"
  39. set cycles "10"
  40. set order "random"
  41. setcycle 0 correct_response "space"
  42. setcycle 1 correct_response "space"
  43. setcycle 2 correct_response "space"
  44. setcycle 3 correct_response "space"
  45. setcycle 4 correct_response "space"
  46. setcycle 5 correct_response "space"
  47. setcycle 6 correct_response "space"
  48. setcycle 7 correct_response "space"
  49. setcycle 8 correct_response "space"
  50. setcycle 9 correct_response "space"
  51. run trial_sequence
  52.  
  53. define sketchpad first_chance_stim
  54. set duration "0"
  55. set description "Displays stimuli"
  56. set start_response_interval "no"
  57. draw textline 0 -96 "Press a key" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  58.  
  59. define sequence trial_sequence
  60. set flush_keyboard "yes"
  61. set description "A single trial"
  62. run first_chance_stim "always"
  63. run first_chance_response "always"
  64. run feedback "[correct]=0"
  65. run inline_script "always"
  66. run second_chance_stim "[second_chance]=yes"
  67. run second_chance_response "[second_chance]=yes"
  68. run logger "always"
  69.  
  70. define sequence experiment
  71. set flush_keyboard "yes"
  72. set description "The main sequence of the experiment"
  73. run experimental_loop "always"
  74.  
  75. define keyboard_response first_chance_response
  76. set description "Collects keyboard responses"
  77. set timeout "infinite"
  78. set flush "yes"
  79.  
  80. define loop experimental_loop
  81. set repeat "1"
  82. set description "A loop containing one or more experimental blocks"
  83. set item "block_sequence"
  84. set column_order "practice"
  85. set cycles "1"
  86. set order "random"
  87. setcycle 0 practice "no"
  88. run block_sequence
  89.  
  90. define keyboard_response second_chance_response
  91. set description "Collects keyboard responses"
  92. set timeout "infinite"
  93. set flush "yes"
  94.  
  95. define inline_script inline_script
  96. ___run__
  97. # First, check whether the response was correct by using the
  98. # built-in OpenSesame variable 'correct', It has the
  99. # value 1 if the most recent response was correct, and the
  100. # value 0 if it was incorrect.
  101.  
  102. # We retrieve this variable by using the experiment function
  103. # 'self.get()'.
  104.  
  105. # If the response was correct, we DON'T need to run the 'second
  106. # chance' items:
  107. if self.get("correct") == 1:
  108. exp.set("second_chance", 'no')
  109.  
  110. # If the response was incorrect, we DO need to run the 'second
  111. # chance items:
  112. elif self.get("correct") == 0:
  113. exp.set("second_chance", 'yes')
  114. __end__
  115. set _prepare ""
  116. set description "Executes Python code"
  117.  
  118. define sketchpad second_chance_stim
  119. set duration "0"
  120. set description "Displays stimuli"
  121. set start_response_interval "no"
  122. draw textline 0 -96 "Press a key" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  123. draw textline 0 -256 "Your response was not correct." center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  124. draw textline 0 -192 "We give you a second chance:" center=1 color=white font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  125.  
  126. define logger logger
  127. set description "Logs experimental data"
  128.  
  129. define sequence block_sequence
  130. set flush_keyboard "yes"
  131. set description "A sequence containing a single block of trials followed by feedback to the participant"
  132. run block_loop "always"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement