If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): win 10
PsychoPy version (e.g. 1.84.x): 2021.2.1
Standard Standalone? (y/n) If not then what?:y
What are you trying to achieve?: I am trying to creat a drifting grating in the Builder mode. According to the book
Building Experiments in PsychoPy from Peirce,
Grating phase in PsychoPy is a little unconventional. Rather than using degrees or radians as its units, PsychoPy uses ‘cycles’ and the wave ‘starts’ in the center of the stimulus. So, when phase is set to 0.0, the grating will have a white stripe in the center, when set to 0.5 it will be 252 black in the center (the trough of the wave is a half cycle from the peak); and when it reaches 1.0 it will be back to being white. This may all seem confusing, but it allows us to make the grating drift very easily by setting the phase to be a value based on time. A phase that is set to $t will drift at 1 cycle per second (Hz), and a phase set to $2*t will drift at 2 Hz.
However, when I defined the phase as $0.5t or $2t, neither works. The Runner software give me a message, NameError: name ‘t’ is not defined
What did you try to make it work?: tried different values, $0.5t or $2t or $t, neither works, the grating do not drift.
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.
I would like to ask, if anybody have experience of drifting grating in the mode of Builder, how to set the phase?