

- #Rand int psychopy update#
- #Rand int psychopy full#
- #Rand int psychopy software#
- #Rand int psychopy windows#
They will all contribute to the finalĪssignment in which you will work on an existing template. Short assignments, which address one basic and simple problem at a time. Because this can be quite complex, we start with It aims at teaching programming skills, which are needed to modify theĮxisting templates such that they meet your own demands. In this way, the PhD student can efficiently program experiments fitting templates), which can beĪdjusted to build up own experiments. The TSG offer (PhD) students a couple of preprogrammed experiments (i.e. Supported by the Faculty of Social Sciences' Technical Support Group (TSG).

#Rand int psychopy software#
Along with NBS Presentation it is the recommended software for time-accurate experiments and therefore PsychoPy is a multi platform (Windows, Linux, Mac) based programmingĪnd program all sort of experiments. This document is automatically generated from an online source: Introduction (Aim of the course) It is an adaptation of the course writtenīy the first two authors, for NBS Presentation for the This course was written by Daniel von Rhein, Pascal de Water and Wilbert van Ham for the

Programming with PsychoPy, 0 Introduction An introductory programming guide for time-accurate experiments Authors: Click here for the web version of this tutorial Python for Social Scientists
#Rand int psychopy update#
tPhase( 0.05, '+') #advance phase by 0.05 of a cycle # and update the mouse contingent gaussian based on the current mouse location # for each loop, update the grating phase QUIT_EXP= False # Loop until we get a keyboard event with the space, Enter (Return), or Escape key is pressed. # Clear all events from the global and device level event buffers. PsychoStim =visual.GratingStim(psychoWindow,tex= None, mask= "gauss", pos=currentPosition,size=( 50, 50),color= 'purple') PsychoStim =visual.PatchStim(psychoWindow, size= 25, pos=, sf= 0, color=, colorSpace= 'rgb') PsychoStim = visual.PatchStim(psychoWindow, mask= "circle", size= 75,pos=, sf=. An ordered dictionary is one that returns keys in the order # they are added, you you can use it to reference stim by a name or by 'zorder' # Create an ordered dictionary of psychopy stimuli. # Hide the 'system mouse cursor' so we can display a cool gaussian mask for a mouse cursor. PsychoWindow = visual.Window(screen_resolution, monitor= "testMonitor", units=coord_type, fullscr= True, allowGUI= False,screen=screen_index)
#Rand int psychopy full#
# Create a psychopy window, full screen resolution, full screen mode, pix units, with no boarder, using the monitor # profile name 'test monitor, which is created on the fly right now by the script Screen_index=display.getStimulusScreenIndex() # get the index of the screen to create the PsychoPy window in. Shuffle(possibleIndices) # shuffle it 'in-place' (no new array)ĬoherentIndices = possibleIndices PossibleIndices = list( range(nNew)) # create an array of indices

NewOris = random(nNew) * 180 # select some elements to be coherent # calculate the orientations for global form stimulus def makeCoherentOris( XYs, coherence, formAngle): # length along the first dimension: Xys = random() * fieldSize - fieldSize / 2.0 # numpy vector globForm = visual.ElementArrayStim(win, Win = visual.Window(, units= 'pix', monitor= 'testMonitor')Ĭoherence = 0.5 # build a standard (but dynamic!) global form stimulus # We only need these two commands from numpy.random: from numpy.random import random, shuffle TargetStimR =visual.GratingStim(winR, ori=20, tex='sin', mask='circle',įrom import cart2pol Size=0.4, sf=3.0, texRes=512, autoLog=False)ĬontextPatchR = visual.GratingStim(winR, tex='sin', mask='circle', TargetStimL = visual.GratingStim(winL, ori=20, tex='sin', mask='circle',
#Rand int psychopy windows#
if the windows have the same characteristics thenĬontextPatchL = visual.GratingStim(winL, tex='sin', mask='circle', WinR = visual.Window(size=, pos=, screen=1,ĪllowGUI=False, fullscr=False) # same place diff screen WinR = visual.Window(size=, pos=, screen=0,ĪllowGUI=False) #, fullscr=True) # same screen diff place WinL = visual.Window(size=, pos=, screen=0, If True: # use two positions on one screen From numpy import sin, pi # numeric python
