Faint frame surrounding Gabor

Hello! Our lab is working on an experiment that involves the presentation of Gabors, but we are noticing a frame-like structure around all four sides of the Gabor that doesn’t fully blend in with the background. It is faint but has defined and noticeable edges, so we are worried this might interfere with our task (Gabor detection with varying spatial frequency). To resolve this issue, we just installed a new AMD graphics card, but the issue still persists. Here is the code I ran to get the screenshot below. Has anyone else encountered this issue or know what steps might resolve it? Thanks so much in advance!

Hi Ghu, I would increase the size of the boundaries of your stimulus. Since it has a Gaussian envelope, that isn’t going to equal the background closely enough within the box that you’ve drawn. You can look at the mathematical values here. If you have a large enough blank area to work with around your Gabor, just extend the boundaries until the edges are so close to the background value that they are not detectable.

Keith

Given that your cutoff is at 3.5*sigma, which should be big enough, I rather think it is a round-off issue. grey=white/2 is really unfortunate in this respect, because it translates to, for example, 127.5 for an 8bpc output. Try to use grey=white/2+0.5/255 consistently throughout (i.e., for both window background and the Gabor).