banklooki.blogg.se

Stimulus duration framen psychopy
Stimulus duration framen psychopy






  1. STIMULUS DURATION FRAMEN PSYCHOPY UPDATE
  2. STIMULUS DURATION FRAMEN PSYCHOPY CODE

By the way, the drifting grating shown below is also produced by a GLSL shader running right inside your browser! And anytime the user changes the value of a parameter or modifies the mathematical expression, the GLSL preview is updated on-the-fly. As illustrated below, Psykinematix GPU Edition provides a live preview of the stimulus using a GLSL shader. But Psykinematix goes a step farther: it takes the exact same mathematical expression entered above, converts it to a GLSL shader, and compiles it on the fly to generate complex stimuli in real-time, all of this being mostly transparent to the user. The Psykinematix GPU Edition took advantage of the GPU ability to run small C-like programs, called GLSL shaders, in parallel at a pixel level. Using GLSL Shader in Psykinematix GPU EditionYes we can, thanks to the advances in the GPU technology (Graphics Processing Unit) present in modern graphics card. But we should be able to do better, right? As a result, the dynamic presentation of a full-screen stimuli presented for just a few seconds could easily take several gigabytes of memory and would require to make some compromises if constrained by the available video memory ( see the math here!). This precomputation however may require some significant amount of memory to store the whole sequence depending on the stimulus size and duration. This texture sequence would be normally generated well in advance before the actual stimulus presentation to ensure an optimal timing because the stimulus generation may actually take, depending on the stimulus complexity, more time than available during 2 consecutive video frames. At run-time, Psykinematix would automatically sample the time variable based on the display refresh rate, and generate a texture for each video frame of the stimulus presentation. With the speed variable expressed in radian or degree units (in term of phase shift per second). For example to generate a drifting grating, we could use: With Psykinematix, you simply use the time variable in the Math expression.

STIMULUS DURATION FRAMEN PSYCHOPY CODE

To generate a time-varying expression, you would also include a temporal variable in the stimulus generation (and add more boilerplate code to your program). If you were programming your own stimuli, you would follow the same basic steps, though using a fair amount of code.

  • and display this texture at a specific position and for a specific duration.
  • evaluate the above expression as function of the spatial ( x, y, r, theta) coordinates to generate the stimulus as an OpenGL texture,.
  • from degrees to pixels for spatial units using the specified viewing distance and display geometry),

    stimulus duration framen psychopy

    convert the parameters to the appropriate units for rendering purpose (e.g.

    STIMULUS DURATION FRAMEN PSYCHOPY UPDATE

    When modifying the stimulus expression or changing the parameter values, Psykinematix would also update the stimulus preview accordingly at design time, and at run-time, Psykinematix would automatically: the spatial frequency sf in cycles per degree and the phase phi in degrees, as illustrated below: For example, to generate a horizontal grating as a custom stimulus in Psykinematix, you would simply enter its minimal expression and specify the values for the parameters in useful units, i.e. With Psykinematix, you just use the same mathematical expression you would include in your manuscript. It gives you the ability to describe complex spatio-temporal and chromatic stimuli using plain Math without the boilerplate code you would typically need when using a programming language like C, Matlab or Python (you know: those loops, array initializations, etc). Using Plain Math in Psykinematix Standard Edition Custom stimuli is one of the most powerful features in Psykinematix Standard Edition.








    Stimulus duration framen psychopy