simvast.blogg.se

Psychopy alignhoriz
Psychopy alignhoriz











psychopy alignhoriz

Mouse.lockMouseToDisplayID(display.getIndex()) # Read the current mouse position (should be 0,0) ) #tSystemCursorVisibility(False) # Set the mouse position to 0,0, which means the 'center' of the screen. PsychoWindow = FullScreenWindow(display) #,res=(500,500),fullscr=False,allowGUI=True) # Hide the 'system mouse cursor' so we can display a cool gaussian mask for a mouse cursor. # Create a psychopy window, using settings from Display device config # To use the ioHub-PsychoPy logging integration then instead of using the logging # module of psychopy to create log entries, use the ioHub experiment object # that was turned into a local variable above by using: # Logging.log( "Visual Stim Resources Created take 3.", 'DEBUG') bug( "Visual Stim Resources Created take 2.",Computer.currentSec()) Logging.log( "Visual Stim Resources Created.", 'DEBUG',Computer.currentSec()) # To add an entry to the psychopy log file you created, and **not** have it also # sent to the ioHub and stored in the ioDataStore, then just use the psychopy # logging module as normal, and as described in the psychopy documentation. Grating = visual.PatchStim(psychoWindow, mask= "circle",units=coord_type, The default # coordinate type is 'pix', you can change this to one of the following supported # corrdinate types by specifying the type you want to use in the Display config dict # passed to launchHubServer. (This will be fixed in a future release). # Currently each stimulus created needs to have the Display's corrdinate type # bassed to it explicitedly. # Hide the 'system mouse cursor' so we can display a cool gaussian mask for a mouse cursor. # Otherwise the settings provided for the iohub Display device are used and the psychopy # monitor config is updated with these display settings and eye to monitor distance. NUp= 1, nDown= 3, #will home in on the 80% threshold StepType = 'lin', stepSizes=, #reduce step size every two reversals Staircase = data.StairHandler(startVal = 20.0, Message2 = visual.TextStim(win, pos=, text= "Then press left or right to identify the %.1fdegree probe." %(expInfo)) Message1 = visual.TextStim(win, pos=,text= 'Hit a key when ready.') Target = visual.PatchStim(win, sf= 1, size= 4, mask= 'gauss', ori=expInfo)įixation = visual.PatchStim(win, color= 'black', tex= None, mask= 'circle',size= 0.2) Win = visual.Window(,allowGUI= False, monitor= 'testMonitor', units= 'deg')įoil = visual.PatchStim(win, sf= 1, size= 4, mask= 'gauss', ori=expInfo) TrialClock = core.Clock() #to keep track of time GlobalClock = core.Clock() #to keep track of time

psychopy alignhoriz

Misc.toFile( 'lastParams.pickle', expInfo) #save params to file for next time else:Ĭore.quit() #the user hit cancel so exit #make a text file to save dataįileName = expInfo + dateStrĭataFile.write( 'targetSide oriIncrement correct\n') Last_wheelPosY= 0 while True: #continue until keypress #handle key presses each frame for event in myKeyboard.getEvents(EventConstants.KEYBOARD_PRESS): Text= 'left-drag=SF, right-drag=pos, scroll=ori', Grating = visual.PatchStim(myWin,pos=( 0.5, 0),ĪutoLog= False) #this stim changes too much for autologging to be useful MyWin = visual.Window(screen_resolution, allowGUI= False, fullscr= True,monitor=monitor)įixSpot = visual.PatchStim(myWin,tex= "none", mask= "gauss", Monitor= monitors.Monitor( "expMonitor", width= 490,distance= 500) Screen_resolution=display.getStimulusScreenResolution() # get 'shortcut' handles to the devices you will be using in the experiment:













Psychopy alignhoriz