

# Start Code - component code to be run before the window creation ThisExp = data.ExperimentHandler(name=expName, version='', # An ExperimentHandler isn't essential but helps with data saving

(logging.WARNING) # this outputs to the screen, not a file LogFile = logging.LogFile(filename+'.log', level=logging.EXP) permissions) we will get errorįilename = 'data' + os.p + '%s_%s' %(expInfo, expInfo) Os.makedirs('data') # if this fails (e.g. If dlg.OK = False: core.quit() # user pressed cancelĮxpInfo = data.getDateStr() # add a simple timestamp # Store info about the experiment sessionĮxpInfo = ĭlg = gui.DlgFromDict(dictionary=expInfo, title=expName) Import os # handy system and path functions Import numpy as np # whole numpy lib is available, prepend 'np.'įrom numpy import sin, cos, tan, log, log10, pi, average, sqrt, std, deg2rad, rad2deg, linspace, asarray)įrom numpy.random import random, randint, normal, shuffle I have my code so far below: from _future_ import division # so that 1/3=0.333 instead of 1/3=0įrom psychopy import visual, core, data, event, logging, sound, guiįrom nstants import * # things like STARTED, FINISHED Ideally, I would like to have 30 images saved to my computer through this code. There are 10 different face pairs in the routine and the routine is looped 3 times. I just want a screenshot of the 1 second time period that the two faces appear on the screen.

I have a fixation cross, followed by 2 faces on the left and right side of the screen, and then a dot. I am trying to capture a timed screenshot during my psychopy task.
