![]() As a result, on most cards, as long as frames are not being ‘dropped’ (see Detecting dropped frames) you can present stimuli for a fixed, reproducible period. Designed psychophysical experiments using MATLABs PsychToolbox and Pythons PsychoPy to quantify perceptual artifacts such as flicker, motion artifacts. the directory you saved the file to, and run: conda env create -n psychopy -f psychopy-env. Calls to Window.flip() will be synchronised to the frame refresh the script will not continue until the flip has occurred. Linux (yum): yum install ffmpeg or yum install gstreamer1. The frame rate is extremely precise, much better than ms-precision. At 60Hz refresh you can not present your stimulus for, say, 120ms the frame period would limit you to a period of 116.7ms (7 frames) or 133.3ms (8 frames).Īs a result, the most precise way to control stimulus timing is to present them for a specified number of frames. ![]() It also might also give the false impression that a stimulus can be presented for any given period. It aims to provide a single package that is: precise enough for psychophysics. An error of 16.7ms might be acceptable to long-duration stimuli, but not to a brief presentation. PsychoPy is an open-source package for creating experiments in behavioral science. You can generate a wide range of experiments easily from the Builder using its intuitive, graphical user interface (GUI). It also has a underlying Reference Manual (API) that you can call directly. So using this method you get timing accurate to the nearest frame period but with little consistent precision. Getting Started PsychoPy v2023.1.1 Getting Started As an application, PsychoPy has two main views: the Builder view, and the Coder view. Alternatively, if the time has reached 2.001s, there will not be an extra frame drawn. So its quite simple - no reaction time measurement necessary. If the screen is refreshing at 60Hz (16.7ms per frame) and the getTime() call reports that the time has reached 1.999s, then the stimulus will draw again for a frame, in accordance with the while loop statement and will ultimately be displayed for 2.0167s. The experiment basically consists of showing some images as priming stimuli, and then a survey without about 40 questions. In the above, the stimulus does not actually get drawn for exactly 0.5s (500ms). flip ()Ĭlocks are accurate to around 1ms (better on some platforms), but using them to time stimuli is not very accurate because it fails to account for the fact that one frame on your monitor has a fixed frame rate. setPhase ( 0.1, '+' ) # increment by 10th of cycle win. ffmpeg psychopy Share Improve this question Follow asked at 14:54 I.Nuel 1 This person seems to have had a similar error and found a solution at the psychopy discourse site. ![]() getTime () < 2.0 : # clock times are in seconds if 0.5 <= clock. Clock () #let's draw a stimulus for 2s, drifting for middle 0.5s while clock. autoLog = False #or we'll get many messages about phase change clock = core. setAutoDraw ( True ) # automatically draw every frame gabor. GratingStim ( win, tex = 'sin', mask = 'gauss', sf = 5, name = 'gabor' ) gabor. From psychopy import visual, core #setup stimulus win = visual.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |