Skip to content

Instantly share code, notes, and snippets.

@smathot
Created November 24, 2014 13:31
Show Gist options
  • Save smathot/2b41410ead97a1685c45 to your computer and use it in GitHub Desktop.
Save smathot/2b41410ead97a1685c45 to your computer and use it in GitHub Desktop.
OpenSesame Expyriment test script
# Generated by OpenSesame 2.9.1 (Hesitant Heisenberg)
# Mon Nov 24 14:31:04 2014 (posix)
# <http://www.cogsci.nl/opensesame>
set mouse_backend "xpyriment"
set subject_parity "even"
set height "768"
set font_family "mono"
set font_italic "no"
set synth_backend "legacy"
set title "Tearing test"
set coordinates "relative"
set start "experiment"
set sampler_backend "legacy"
set transparent_variables "no"
set foreground "white"
set font_bold "no"
set description "Default description"
set background "black"
set font_size "18"
set keyboard_backend "legacy"
set canvas_backend "xpyriment"
set compensation "0"
set bidi "no"
set subject_nr "0"
set width "1024"
define sequence experiment
run getting_started "always"
run inline_script "always"
run feedback "always"
define feedback feedback
set duration "keypress"
draw textline 0 0 "Frame dur = [frame_dur_mean] ms ([frame_dur_sd])" center=1 color="white" font_family="mono" font_size=18 font_bold="no" font_italic="no" html="yes" z_index=0 show_if="always"
define notepad getting_started
__note__
Hi,
Welcome to OpenSesame 2.9.0 "Hesitant Heisenberg"!
If you are new to OpenSesame, you may wish to follow one of the tutorials,
which can be found online.
There are also many example experiments, which may help you to get started
with creating your own. These can be found in the "examples" folder provided
with OpenSesame or, again, online,
For more information, please refer to OpenSesame documentation area:
- <http://osdoc.cogsci.nl/>
And feel free to ask for help on the forum:
- <http://forum.cogsci.nl/>
Have fun with OpenSesame!
--
Sebastiaan
__end__
set description "Some pointers to help you get started!"
define inline_script inline_script
___run__
from openexp.canvas import canvas
import numpy as np
c1 = canvas(exp, bgcolor='blue')
c2 = canvas(exp, bgcolor='yellow')
l = []
for i in range(100):
t = c1.show()
l.append(t)
t = c2.show()
l.append(t)
a = np.array(l)
d = a[1:] - a[:-1]
exp.set('frame_dur_mean', d.mean())
exp.set('frame_dur_sd', d.std())
import expyriment
print expyriment.get_system_info()
__end__
set _prepare ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment