This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
from exparser.DataMatrix import DataMatrix | |
from generate import edgeDetect | |
import os | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from scipy import ndimage, interpolate, misc | |
from exparser import TraceKit as tk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import os | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from scipy import ndimage, interpolate, misc | |
from exparser import TraceKit as tk | |
from skimage import draw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __init__(self, log_comment=None): | |
"""Create a stimulus. | |
Keyword arguments: | |
log_comment -- the comment for the event log file (str) (optional) | |
""" | |
self._id = Stimulus._id_counter | |
Stimulus._id_counter += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.25-pre1 (Dashy Darwin) | |
# Thu Sep 15 16:39:04 2011 (posix) | |
# | |
# Copyright Sebastiaan Mathot (2010-2011) | |
# <http://www.cogsci.nl> | |
# | |
set foreground "white" | |
set subject_parity "even" | |
set description "Default description" | |
set title "Counterbalancing example" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by OpenSesame 0.27~pre31 (Frisky Freud) | |
# Fri Nov 30 17:42:30 2012 (posix) | |
# <http://www.cogsci.nl/opensesame> | |
set foreground "white" | |
set subject_parity "even" | |
set font_size "18" | |
set description "Default description" | |
set title "Xpyriment timing check" | |
set font_bold "no" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from expyriment import stimuli, control, design | |
import time | |
from random import randint | |
control.defaults.initialize_delay = 0 | |
control.defaults.open_gl = True | |
exp = design.Experiment() | |
control.initialize(exp) | |
l = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ref: <http://forum.cogsci.nl/discussion/198> | |
# This script should be placed in the prepare phase of an inline_script, before | |
# the open_question item. | |
# | |
# First retrieve the full path to a file called 'question.txt' in the file pool | |
path = exp.get_file('question.txt') | |
# Read the entire contents of the file. | |
question = open(path).read() | |
# Set the variable, so that the open_question item can use it. | |
exp.set('_question', question) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenSesame supports a sub-set of HTML tags: | |
- <b>Bold face</b> | |
- <i>Italic</i> | |
- <u>Underline</u> | |
In addition, you can pass 'color', 'size', and 'style' as keywords to a 'span' tag: | |
- <span color="red">Color</span> | |
- <span size="32">Font size</span> | |
- <span style="serif" mce_style="serif">Font style</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a canvas to show info on screen | |
from openexp.canvas import canvas | |
canvas = canvas(self.experiment) | |
from ctypes import windll, c_ubyte | |
io = windll.dlportio # requires dlportio.dll !!! | |
# Define port: | |
port = 0x4cf8 | |
# Execute the script below twice, once in the old way, once in the | |
# newly-suggested way: | |
for change_to_ubyte in (False, True): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set rows "1;1;1;1;1" | |
set cols "1;1" | |
widget 0 0 2 1 label text="Indicate how much you agree with the following statements" | |
widget 0 1 1 1 label center="no" text="Forms are easy" | |
widget 1 1 1 1 rating_scale var="question1" nodes="Agree;Don't know;Disagree" | |
widget 0 2 1 1 label center="no" text="I like data" | |
widget 1 2 1 1 rating_scale var="question2" nodes="Agree;Don't know;Disagree" | |
widget 0 3 1 1 label center="no" text="I like questionnaires" | |
widget 1 3 1 1 rating_scale var="question3" nodes="Agree;Don't know;Disagree" | |
widget 0 4 2 1 button text="Next" |