Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- API: 2
- OpenSesame: 3.0.4
- Platform: nt
- ---
- set width 1024
- set uniform_coordinates "yes"
- set title "PyGaze eye-tracking template"
- set subject_parity "even"
- set subject_nr 0
- set start "experiment"
- set height 768
- set foreground "white"
- set font_size 18
- set font_italic "no"
- set font_family "mono"
- set font_bold "no"
- set description "A template for eye-tracking experiments"
- set coordinates "relative"
- set compensation 0
- set canvas_backend "xpyriment"
- set bidi "yes"
- set background "black"
- define notepad about_this_template
- __note__
- Hi,
- This template already contains the basic structure needed for a typical
- eye-tracking experiment, consisting of a practice phase, followed by an
- experimental phase.
- For more information, please refer to the website:
- <http://www.cogsci.nl/opensesame>
- Have fun with OpenSesame!
- --
- Sebastiaan
- __end__
- set description "Some pointers to help you gest started!"
- define loop block_loop
- set skip 0
- set repeat 1
- set order "random"
- set offset "no"
- set item "trial_sequence"
- set description "A single block of trials"
- set cycles 3
- set column_order "item_number"
- set break_if "never"
- setcycle 0 item_number "14"
- setcycle 1 item_number "18"
- setcycle 2 item_number "34"
- run trial_sequence
- 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 reset_feedback always
- run block_loop always
- run feedback always
- define sampler context
- set volume 1
- set stop_after 0
- set sample "sentences/filler[item_number]_ctxt.ogg"
- set pitch 1
- set pan 0
- set fade_in 0
- set duration "sound"
- set description "Plays a sound file in .wav or .ogg format"
- define sketchpad end_of_experiment
- set start_response_interval "no"
- set duration "keypress"
- set description "A sketchpad notifying the participant that the experiment is finished"
- 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
- define sketchpad end_of_practice
- set start_response_interval "no"
- set duration "keypress"
- set description "A sketchpad notifying the participant that the practice phase is finished"
- 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 continue" x=0 y=0 z_index=0
- define sequence experiment
- set flush_keyboard "yes"
- set description "The main sequence of the experiment"
- run pygaze_init always
- run instructions always
- run practice_loop always
- run end_of_practice always
- run experimental_loop always
- run end_of_experiment always
- define loop experimental_loop
- set skip 0
- set repeat 1
- set order "random"
- set offset "no"
- set item "block_sequence"
- set description "A loop containing one or more experimental blocks"
- set cycles 1
- set column_order "practice"
- set break_if "never"
- setcycle 0 practice "no"
- run block_sequence
- define feedback feedback
- set reset_variables "yes"
- set duration "keypress"
- set description "Provides feedback to the participant"
- 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" x=0 y=-96 z_index=0
- 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 continue" x=0 y=32 z_index=0
- 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 accuracy was [acc]%" x=0 y=-32 z_index=0
- define sketchpad fix_dot
- set duration "keypress"
- set description "Displays stimuli"
- draw fixdot color=white show_if=always style=default x=0 y=0 z_index=0
- define sketchpad instructions
- set start_response_interval "no"
- set duration "keypress"
- set description "A sketchpad containing the instructions for the participant"
- 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 begin!" x=0 y=0 z_index=0
- define keyboard_response keyboard_response
- set timeout "infinite"
- set flush "yes"
- set duration "keypress"
- set description "Collects keyboard responses"
- define logger logger
- set description "Logs experimental data"
- set auto_log "yes"
- define sampler new_sampler
- set volume 1
- set stop_after 0
- set sample "Silence.ogg"
- set pitch 1
- set pan 0
- set fade_in 0
- set duration "sound"
- set description "Plays a sound file in .wav or .ogg format"
- define sampler new_sampler_1
- set volume 1
- set stop_after 0
- set sample "Silence.ogg"
- set pitch 1
- set pan 0
- set fade_in 0
- set duration "sound"
- set description "Plays a sound file in .wav or .ogg format"
- define loop practice_loop
- set skip 0
- set repeat 1
- set order "random"
- set offset "no"
- set item "block_sequence"
- set description "A loop containing one or more practice blocks"
- set cycles 1
- set column_order "practice"
- set break_if "never"
- setcycle 0 practice "yes"
- run block_sequence
- define pygaze_drift_correct pygaze_drift_correct
- set ypos 0
- set xpos 0
- set target_style "small-cross"
- set target_color "[foreground]"
- set fixation_triggered "no"
- set draw_target "yes"
- set description "Perform eye-tracker drift correction"
- define pygaze_init pygaze_init
- set tracker_type "Simple dummy"
- set smi_send_port 4444
- set smi_recv_port 5555
- set smi_ip "127.0.0.1"
- set sacc_vel_thr 35
- set sacc_acc_thr 9500
- set eyelink_pupil_size_mode "area"
- set eyelink_force_drift_correct "yes"
- set description "Initialize and calibrate eye tracker"
- set calibrate "yes"
- set calbeep "yes"
- set _logfile "automatic"
- define pygaze_log pygaze_log
- set throttle 2
- set msg ""
- set description "Writes information to the eye-tracker logfile"
- set auto_log "yes"
- define pygaze_start_recording pygaze_start_recording
- set status_msg "start_trial [count_trial_sequence]"
- set description "Puts the eye tracker into recording mode"
- define pygaze_stop_recording pygaze_stop_recording
- set status_msg "stop_trial"
- set description "Stops recording of eye tracking data"
- define reset_feedback reset_feedback
- set description "Resets the feedback variables, such as 'avg_rt' and 'acc'"
- define sketchpad scene
- set duration 0
- set description "Displays stimuli"
- draw image center=1 file="scenes/filler[item_number].bmp" scale=1 show_if=always x=0 y=0 z_index=0
- define sketchpad sketchpad
- set start_response_interval "no"
- set duration 0
- set description "Displays stimuli"
- draw fixdot color=white show_if=always style=default x=0 y=0 z_index=0
- define sampler target
- set volume 1
- set stop_after 0
- set sample "sentences/filler[item_number]_filler_target.ogg"
- set pitch 1
- set pan 0
- set fade_in 0
- set duration "sound"
- set description "Plays a sound file in .wav or .ogg format"
- define sequence trial_sequence
- set flush_keyboard "yes"
- set description "A single trial"
- run pygaze_drift_correct always
- run pygaze_start_recording always
- run fix_dot always
- run scene always
- run context always
- run target always
- run sketchpad always
- run keyboard_response always
- run logger always
- run pygaze_log always
- run pygaze_stop_recording always
Advertisement
Add Comment
Please, Sign In to add comment