Advertisement
Guest User

Untitled

a guest
Jan 8th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. # Generated by OpenSesame 0.27 (Frisky Freud)
  2. # Tue Jan 8 12:52:39 2013 (posix)
  3. # <http://www.cogsci.nl/opensesame>
  4.  
  5. set foreground "black"
  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 "white"
  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 "300"
  28. set reset_variables "yes"
  29. set description "Provides feedback to the participant"
  30. draw textline 0 -64 "[total_duration]" center=1 color=black font_family="mono" font_size=18 font_italic=no font_bold=no show_if="always"
  31.  
  32. define rating_scale rating_scale
  33. set maximum_rating "5"
  34. set accept_text "Accept"
  35. set question "How much did you like these eyes?"
  36. set description "Presents a rating scale form"
  37. set allow_empty "no"
  38.  
  39. define inline_script determine_duration
  40. ___run__
  41. # Here we will determine the duration of the interval
  42. # between stimulus presentation and keyboard response.
  43.  
  44. # First, determine the time stamp of the stimulus.
  45. stim_stamp = self.get("time_stimulus")
  46.  
  47. # Next, determine the time stamp of the q-press. Because there
  48. # is no built-in variable containing the time stamp of the keyboard
  49. # response itself (only the response time relative to the onset
  50. # of the keyboard item), we use the following trick:
  51.  
  52. # We present a dummy sketchpad immediately after the keypress,
  53. # set its duration to 0, and use the time stamp of this
  54. # item as the time stamp of the response.
  55. resp_stamp = self.get("time_dummy_item")
  56.  
  57. # The duration is the difference between the two
  58. # time stamps in ms (so the goal duration is 120000).
  59. total_duration = resp_stamp - stim_stamp
  60.  
  61. # Finally, we set the variable for future use in the
  62. # interface (notably, the logger item):
  63. total_duration = exp.set("total_duration", total_duration)
  64. __end__
  65. set _prepare ""
  66. set description "Executes Python code"
  67.  
  68. define sequence trial_sequence
  69. set flush_keyboard "yes"
  70. set description "A single trial"
  71. run stimulus "always"
  72. run rating_scale "always"
  73. run white_display "always"
  74. run keyboard_response "always"
  75. run dummy_item "always"
  76. run determine_duration "always"
  77. run feedback "always"
  78. run logger "always"
  79.  
  80. define sketchpad white_display
  81. set duration "0"
  82. set description "Displays stimuli"
  83.  
  84. define loop block_loop
  85. set repeat "1"
  86. set description "A single block of trials"
  87. set skip "0"
  88. set offset "no"
  89. set item "trial_sequence"
  90. set column_order ""
  91. set cycles "2"
  92. set order "random"
  93. run trial_sequence
  94.  
  95. define sequence experiment
  96. set flush_keyboard "yes"
  97. set description "The main sequence of the experiment"
  98. run experimental_loop "always"
  99.  
  100. define loop experimental_loop
  101. set repeat "1"
  102. set description "A loop containing one or more experimental blocks"
  103. set item "block_sequence"
  104. set column_order "practice"
  105. set cycles "1"
  106. set order "random"
  107. setcycle 0 practice "no"
  108. run block_sequence
  109.  
  110. define keyboard_response keyboard_response
  111. set correct_response "q"
  112. set allowed_responses "q"
  113. set description "Collects keyboard responses"
  114. set timeout "infinite"
  115. set flush "yes"
  116.  
  117. define sketchpad stimulus
  118. set duration "700"
  119. set description "Displays stimuli"
  120. draw image 0 0 "face-glasses.png" scale=1 center=1 show_if="always"
  121.  
  122. define logger logger
  123. set description "Logs experimental data"
  124.  
  125. define sketchpad dummy_item
  126. set duration "0"
  127. set description "Displays stimuli"
  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