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 grating.py, 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:

http://www.djmannion.net/psych_programming/vision/draw_gratings/draw_gratings.html#spatial-frequency

and an old post from @jon here:

https://groups.google.com/d/msg/psychopy-users/KrMtf6fWZu0/Vl6EI3MN9OMJ