PsychoJS is not creating my Gratings

Hi everyone, my problem is PsychoJS is not creating my Gratings. I checked to be sure that the component is supported here

My test is very simple, I just want to show 6 gabors on screen, that works on desk, but when I compile the JS, the gabors are not created. If I run the experiment local, just show the fixation image.

My code component only has this line:

positions = [(200.0, 0.0), (100, 173), (-100, 173), (-200.0, 2), (-100, -173), (100, -173)]

Thanks in advance.

Hi There,

You checked in the right place alright! but unfortunately gratings is currently listed under the ‘Not (but could be)’ implemented options.

Depending on the range of gratings required, you could consider using image stimuli (created using grating stim locally in psychopy)for now.


Oh that’s embarrassing, I hadn’t noticed that there are headers there.

I was thinking about that solution in case Gratings didn’t work, I just need to create 50 images, because I need a grating for each opacity since .5 to 1, but I’m kinda afraid about lossing some quality or opacity precision when I create those images.

Thanks for your clarification.

PS: I just watched your YT tutorials on Psychopy’s page, thanks for that help too.

Hi There,

You could use PsychoPy coder to create a large number of images without loosing resolution. Since this is a common issue on the forum at the moment I made a demo that you can download here :slight_smile:

Hope this is helpful,


Hi Becca,

Thanks a lot! This is very helpful, I didn’t know that I actually can save a specific frame from the window.

Thank you again,

No problem! Pleased you found it helpful!