Yes so if you are looking to use gratings for the purposes of things like orientation you can make stimuli using the code @wakecarter referred to there and that is what is used in the starcase demo orientation_staircase [PsychoPy].
An important thing to consider however is that gabor/grating stimuli do not have the same meaning in terms of luminance transitions unless the monitor it is presented on has been calibrated (i.e. with a photometer). This is the reason the grating stim component was not given priority for translation for online development, because it is assumed that most online studies will not be using calibrated monitors. Highlighting as a consideration for translating gabor/gating stimuli online
Hop this helps,
Becca
I’m not positive, but I don’t think this would be feasible with dynamic stimuli though. My task requires dynamic gratings moving around a screen and I can’t think of any way to achieve that with images of gratings. I hope I’m wrong though!
So is the conversion of python to JS not supported? I’m hoping I can just code this is JS and get it to run on Pavlovia for now. Much more comfortable with python at the moment and was enjoying PsychoPy and the builder GUI, but hopefully I’ll be able to figure out gratings in JS.
The gratingstim class does not yet exist in psychoJS - so it will not work online.
If you need dynamic gratings then you can create movies as @wakecarter mentioned. To make your movies I recommend first looking at the repository shared above and also trying out demos > misc > makemovie from psychopy coder - then you can present movies online.