Sorry, your browser doesn't support canvas element !
A simple drifting grating
Use the sliders below to change its properties
1
cycle per degree (cpd)
90
deg
360
phase shift in deg/s
v1.0
© 2020 KyberVision - Innovation in Vision Sciences
Send Feedback
Drifting gratings have been extensively used to study vision both psychophysically and neurophysiologically. They can help characterize the spatial and temporal tuning properties of visual channels or even neurons, such as orientation tuning, direction preference, and temporal frequency tuning.

Just a couple of references:

 Greenlee et al (1990) Spatial-frequency discrimination of drifting gratings. Vision Research 30(9):1331–1339

 Xing et al (2012) Laminar analysis of visually evoked activity in the primary visual cortex. PNAS 109(34):13871–13876

Here is the math behind this stimulus:

z = cos(2*pi*x*sf+phi+speed*time)

  • sf, the spatial frequency expressed in cycles per degree of visual angle, controls the width of the vertical bands (note that sf is inversely proportional to the width of the white-dark bands also called wavelength, sf = 1/wavelength),

  • phi, the spatial phase expressed in degrees or radians, controls the spatial shift at the start of the motion,

  • speed, the speed of the drifting motion expressed in degrees or radians per second, controls the velocity of the drifting motion.

x and time are the spatial and temporal coordinates, respectively, of the stimulus, z is the stimulus appearance in term of luminance contrast (with maximum 100%).

If you increase the spatial frequency sf beyond a certain point, you may observe some distortion or aliasing effects. The drifting may even occur in the opposite direction ! This typically occurs when the frequency gets higher than the Nyquist frequency (defined as half of the sampling rate, defined here by the pixel resolution of the display).

The whole stimulus is generated in real-time using a GLSL shader that runs right inside your WebGL-compatible browser. The plain Math behind the stimulus was converted to this optimized GLSL shader using the new Psykinematix Pro Edition. Translation to Matlab and Python code is also possible !

This whole widget was also fully generated using Psykinematix Pro Edition. The parameters that control the stimulus properties through the sliders are the same as the ones you would define as dependent or independent variables when using the stimulus in an actual psychophysical experiment run in Psykinematix. The widget creation is otherwise fully customizable with your own logo, copyright, links, etc.

To learn more about the widget creation, click on the above "Made With" button !
v1.0
© 2020 KyberVision - Innovation in Vision Sciences