Пример #1
0
from SimpleVisionEgg import *

# get information from subject before initializing vision egg
# global variables for experiment condition coding
SUBJECT = raw_input("Participant: ")
HANDEDNESS = EH.subject_info("Condition (S/D): ", ("S", "D"))
exp_version = EH.subject_info("Expt Version (1/2): ", (1, 2))
if exp_version == 1:
    APPROACH_SIDE_FIRST = "LEFT"
    WITHDRAW_SIDE_FIRST = "RIGHT"
elif exp_version == 2:
    APPROACH_SIDE_FIRST = "RIGHT"
    WITHDRAW_SIDE_FIRST = "LEFT"

# initialize vision egg
vision_egg = SimpleVisionEgg()
screen = vision_egg.screen
screen.parameters.bgcolor = (0, 0, 0)
xlim, ylim = vision_egg.screen.size  # size of the screen in pixels

# a few useful stim objects
std_params = {"anchor": "center", "position": (xlim / 2, ylim / 2), "on": False}  # for text display objects
fixation = Text(text="+", font_size=55, **std_params)
blank = Text(text="", **std_params)
rest_screen = Text(text="Press SPACE to continue.", **std_params)

###########################
# A couple useful classes #
###########################
class PicStim(TextureStimulus):
    """ Stimulus object for showing a picture.
Пример #2
0
                    limit -- if you give it key values (e.g. ("l","m") accepts only those)
                    buttonbox -- a parallel.respbox.RespBox instance
                        this gives back the integer 2^x, x indexes the finger
                        dont give it a limit if you do this
"""

# Here's an easy way to imput the subject designation and other starting info
subject = raw_input('Subject designation: ')
exp_version = None
while exp_version not in (1, 2):
    exp_version = input("Experiment Version (1 or 2): ")

##############
# Initialize #
##############
vision_egg = SimpleVisionEgg()
screen = vision_egg.screen
screen.parameters.bgcolor = [0,0,0]
xlim, ylim = vision_egg.screen.size # screen size in pixels
#box = respbox.RespBox()

###########
# Stimuli #
###########
std_params = {'anchor': 'center', # for text display objects 
              'position': (xlim/2,ylim/2), 
              'on': False} 

rest = Text(text="Press space to begin.", **std_params)
fixation = Text(text="+", font_size=55, **std_params)
blank = Text(text="", **std_params)
Пример #3
0
# You need to import these in addition to whatever else you do
from StimController import Response, Event, Trial, StimController
from SimpleVisionEgg import *
# If using a buttonbox:
#from parallel import respbox

from pygame import K_SPACE
import random
from VisionEgg.Text import Text
from VisionEgg.MoreStimuli import FilledCircle


##############
# Initialize #
##############
vision_egg = SimpleVisionEgg()
screen = vision_egg.screen
screen.parameters.bgcolor = [0,0,0]
xlim, ylim = vision_egg.screen.size # screen size in pixels
#box = respbox.RespBox()

###########
# Stimuli #
###########
center = (xlim/2,ylim/2) 
rest = Text(text="Press space to begin.", position=center, anchor='center',
            on=False)

				
cues = ['G','N']
fixation = dict((cue, Text(text=cue, font_size=55, position=center, anchor='center', 
Пример #4
0
sys.path.append(SVE_DIRECTORY)  # add the SimpleVisionEgg functions to path
from random import shuffle, randint
from pygame import K_SPACE
from VisionEgg.Text import Text
from VisionEgg.WrappedText import WrappedText
from VisionEgg.Textures import Texture, TextureStimulus
from StimController import Response, Event, Trial, StimController
from SimpleVisionEgg import *

trial_index = 0

SUBJECT = raw_input('Participant: ')
time_point = int(raw_input('Time (1/2/3/4): '))

# initialize vision egg
vision_egg = SimpleVisionEgg()
screen = vision_egg.screen
screen.parameters.bgcolor = (0, 0, 0)
xlim, ylim = vision_egg.screen.size  # size of the screen in pixels

# a few useful stim objects
std_params = {
    'anchor': 'center',  # for text display objects
    'position': (xlim / 2, ylim / 2),
    'on': False
}
fixation = Text(text="+", font_size=55, **std_params)
mask = Text(text="XXXXXXXXXXX", font_size=55, **std_params)
blank = Text(text="", **std_params)
rest_screen = Text(text="Press SPACE to continue.", **std_params)