Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by OpenSesame 0.27 (Frisky Freud)
- # Tue Jan 8 12:52:39 2013 (posix)
- # <http://www.cogsci.nl/opensesame>
- set foreground "black"
- set subject_parity "even"
- set font_size "18"
- set description "A template containing a practice and an experimental phase"
- set title "Extended template"
- set start "experiment"
- set font_bold "no"
- set coordinates "relative"
- set height "768"
- set mouse_backend "legacy"
- set width "1024"
- set compensation "0"
- set sampler_backend "legacy"
- set keyboard_backend "legacy"
- set background "white"
- set subject_nr "0"
- set canvas_backend "legacy"
- set font_family "mono"
- set synth_backend "legacy"
- set font_italic "no"
- define feedback feedback
- set duration "300"
- set reset_variables "yes"
- set description "Provides feedback to the participant"
- 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"
- define rating_scale rating_scale
- set maximum_rating "5"
- set accept_text "Accept"
- set question "How much did you like these eyes?"
- set description "Presents a rating scale form"
- set allow_empty "no"
- define inline_script determine_duration
- ___run__
- # Here we will determine the duration of the interval
- # between stimulus presentation and keyboard response.
- # First, determine the time stamp of the stimulus.
- stim_stamp = self.get("time_stimulus")
- # Next, determine the time stamp of the q-press. Because there
- # is no built-in variable containing the time stamp of the keyboard
- # response itself (only the response time relative to the onset
- # of the keyboard item), we use the following trick:
- # We present a dummy sketchpad immediately after the keypress,
- # set its duration to 0, and use the time stamp of this
- # item as the time stamp of the response.
- resp_stamp = self.get("time_dummy_item")
- # The duration is the difference between the two
- # time stamps in ms (so the goal duration is 120000).
- total_duration = resp_stamp - stim_stamp
- # Finally, we set the variable for future use in the
- # interface (notably, the logger item):
- total_duration = exp.set("total_duration", total_duration)
- __end__
- set _prepare ""
- set description "Executes Python code"
- define sequence trial_sequence
- set flush_keyboard "yes"
- set description "A single trial"
- run stimulus "always"
- run rating_scale "always"
- run white_display "always"
- run keyboard_response "always"
- run dummy_item "always"
- run determine_duration "always"
- run feedback "always"
- run logger "always"
- define sketchpad white_display
- set duration "0"
- set description "Displays stimuli"
- define loop block_loop
- set repeat "1"
- set description "A single block of trials"
- set skip "0"
- set offset "no"
- set item "trial_sequence"
- set column_order ""
- set cycles "2"
- set order "random"
- run trial_sequence
- define sequence experiment
- set flush_keyboard "yes"
- set description "The main sequence of the experiment"
- run experimental_loop "always"
- define loop experimental_loop
- set repeat "1"
- set description "A loop containing one or more experimental blocks"
- set item "block_sequence"
- set column_order "practice"
- set cycles "1"
- set order "random"
- setcycle 0 practice "no"
- run block_sequence
- define keyboard_response keyboard_response
- set correct_response "q"
- set allowed_responses "q"
- set description "Collects keyboard responses"
- set timeout "infinite"
- set flush "yes"
- define sketchpad stimulus
- set duration "700"
- set description "Displays stimuli"
- draw image 0 0 "face-glasses.png" scale=1 center=1 show_if="always"
- define logger logger
- set description "Logs experimental data"
- define sketchpad dummy_item
- set duration "0"
- set description "Displays stimuli"
- define sequence block_sequence
- set flush_keyboard "yes"
- set description "A sequence containing a single block of trials followed by feedback to the participant"
- run block_loop "always"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement