Current drifting grating plugin

Hi Chris,

While awaiting your wonderful work porting our Grating plugin, we have been using the standard drifting grating and noticed a couple of behavior that are potentially incorrect.

1-At the highest contrast the gaussian window doesn’t look like a gaussian. I know that there is a perceptual effect whereby our visual system creates the illusion of a circle, but it does seem to meet there is a circle on top of that. Not clear what equation is being used, but it is almost like the top is flat circle that then gets rounded once it reaches a point. As you were suggesting earlier on, might be smarter to use a cosine instead of a gaussian anyway.

2-When opting of square instead of sinusoid, the resulting square wave isn’t anti-aliased. When the frequency is high, the bar are thing, the width of the black and white stripe are different making it a random rectangular wave as compared to an even square wave.

Again, not sure how important those things are to whoever wrote the first version of this plugin, but for unexperienced users these are major stimulus issues that are important to resolve.

Best
Najib

Hi Najib,

Not clear what equation is being used, but it is almost like the top is flat circle that then gets rounded once it reaches a point.

It sounds like you’re describing this problem. If you set the grating’s normalized parameter to NO, does it look like you expect?

When opting of square instead of sinusoid, the resulting square wave isn’t anti-aliased. When the frequency is high, the bar are thing, the width of the black and white stripe are different making it a random rectangular wave as compared to an even square wave.

Yes, I see what you mean. I think I know the right way to fix this. I’ll try to get the change in to the nightly build soon.

Thanks,
Chris

Hi Najib,

When opting of square instead of sinusoid, the resulting square wave isn’t anti-aliased. When the frequency is high, the bar are thing, the width of the black and white stripe are different making it a random rectangular wave as compared to an even square wave.

This is fixed in the nightly build, for both square and sawtooth gratings.

Cheers,
Chris