The oscillations were sensitive to the spatial frequency content of a visual stimulus and required the mAChRs for their induction and expression. The oscillations emerged in visually evoked potentials and single-unit activity following repeated visual stimulation. Here we describe a new form of experience-dependent low-frequency oscillations in the primary visual cortex (V1) of awake adult male mice. However, the neural substrates underlying this phenomenon are poorly understood. Many keyboards have an inherent 10-30 ms latency anyway, so you can't get rid of all latency.Familiarity of the environment changes the way we perceive and encode incoming information. if up to +16ms error in RT recording matters), use the iohub module. If you want to get real asynchronous polling of the keyboard state (i.e. In this "frame-locked loop" the key response is therefore discretized to frame intervals. Note that event.getKeys() records the time this line was executed, not the time that the key was pressed. I've used core.Clock() to assess the time here, but your win.logOnFlip() is just as good. Win.flip() # inner loop is timed to this, as long as the rest of the code in here doesn't take longer than a frame. If keepLooping: # do not show bitmap2 if a key was pressed on bitmap1 While keepLooping: # continue until breakįor thisBitmap in : # alternate between images So to switch between two imagesStims ( bitmap1 and bitmap2) until there is a response: clock = core.Clock() # to assess timing So looping over win.flip() will give you exactly one frame per loop. Yes, there is a better way! The standard solution exploits the fact that win.flip() halts code execution until the next monitor update. Win.saveFrameIntervals(filename+'.log', clear=True) Print keys, rt #show resp and rt on screen Keys = event.getKeys(keyList=) #record resp Win.logOnFlip(msg='frame=%i' %frameN, level=logging.DEBUG) #record the time of win.flip() in the log file # Initialize clock to register response time Keys = event.getKeys(keyList=)īitmap1 = visual.ImageStim(win, 'Mondrians/Mask_1.bmp', size=scrsize)īitmap2 = visual.ImageStim(win, 'Mondrians/Mask_2.bmp', size=scrsize) Keys = event.getKeys(keyList=) #allow only space and escape keys #win = visual.Window(, fullscr=True, allowGUI=False, waitBlanking=True) Win = visual.Window(size=scrsize, color='white', units='pix', fullscr=False) (logging.WARNING) # outputs to the screen, not a file LogFile = logging.LogFile(filename+'.log', level=logging.DEBUG) _thisDir = os.path.dirname(os.path.abspath(_file_))ĭlg = gui.DlgFromDict(dictionary=exp_info, title=exp_name)įilename = _thisDir + os.sep + 'data/%s_%s_%s' %(exp_info, exp_name, exp_info) # Ensure that relative paths start from the same directory as this script Here my code: import os # for file/folder operationsįrom psychopy import visual, event, core, gui, data, logging I would be very grateful if you could give me some tips on how to achieve (and verify) presentation of each image for 6 frames. The function core.wait() only takes time in seconds, and not in frames, correct? I am verifying it by writing the frame of each flip to the log file with win.logOnFlip()īut I believe I could be way more precise I only knew how to define the duration of the image in terms of frames. I sort of got it right by using core.wait(.084) after win.flip() - on a 60Hz screen that gives approximately 100ms. I have some experience in Matlab, but am very new to PsychoPy.įor now I would like to continuously switch between two images until there is a keyboard response.Įach image should stay on the screen exactly for 100ms, and I want to be able to verify that this is the case (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |