| Reference | Downloads | Github

How to get rid of line crossing over Grating Stim


I’m drawing a cross using Grating stim with the code below. I can draw this stimulus with no problems if the position of the stimulus is the center (0, 0), However if I draw the stimulus in a different location (in the x direction) I get a white line crossing the center of the cross as you can see in the image attached. I have tried in 2 different computers/screens and the line appears when drawing the stimulus in both. I have tried changing some parameters to try to get rid of it with no luck.
Any suggestions appreciated!

crossVert=[[0.1, 0.1],[0.1,0.4], [-0.1, 0.4], [-0.1,0.1], [-0.4,0.1], [-0.4, -0.1], [-0.1, -0.1], [-0.1, -0.4], [0.1, -0.4], [0.1, -0.1], [0.4, -0.1], [0.4,0.1]]

cross = visual.ShapeStim(myWin,name="cross", vertices=crossVert, fillColor=None,           lineColor="red", lineWidth=1, size=[3.5,3.5],pos=[0,0])
myGratingCross = visual.GratingStim(myWin, tex='sin', sf=[0.03,0], texRes=256, mask= polyShape4, units='pix', contrast= 0.5,  size=math.ceil(cross.size[0]/deg_per_px), pos= np.array(cross.pos)/deg_per_px)



I was able to get rid of the line by changing the vertices of the cross.