| Reference | Downloads | Github

What is the default size of GratingStim in pixels? Grating goes crazy when unit was set to pix

Hi there,

I can’t quite identify from the source code off, the default size of the grating stim? It seems to be set to a default size of [1.0, 1.0] with the units=’’ (I assume it is set to norm?). I wish to specify the size of the grating stimulus in pixels. But when I did this, the spatial frequency turns wonky in such that it made the gabor stimulus move in ‘3D’. The source code mentioned that ‘sf’ depends on whether unit is set to deg, cm or norm, but nothing on pix.

Any help would be appreciated!

See this page by @djmannion where he describes how to set the spatial frequency if the stimulus has dimensions defined in pixels:

and an old post from @jon here: