###I’d like to draw 2 rings on the window. I have made the images using BufferImageStim(white in image, black background like these)
But I dont know how to set the elementTex and elementMask in ElementArrayStim:
Right now it looked like these in window.
I have no idea why the colors turned into grey.
here are the codes:
_TEX = np.load(’./stimImage/stim4OutRing.npy’)
_MASK = np.flipud(np.fliplr(np.copy(_TEX)))
_TEX_1 = np.load(’./stimImage/stim4InRing.npy’)
_MASK_1 = np.flipud(np.fliplr(np.copy(_TEX)))
stimSize = 0.28
pos = [0, 0]
xys = np.array(pos) + np.array([[-stimSize/2, stimSize/2], [stimSize/2, stimSize/2], [stimSize/2, -stimSize/2], [-stimSize/2, -stimSize/2]])
stimulus = visual.ElementArrayStim(mywin, units=‘height’, sizes=[stimSize, stimSize], elementTex=_TEX, elementMask=_MASK, colorSpace=‘rgb’,
nElements=4, xys=xys, oris=[180, -90, 0, 90])
stimulus_1 = visual.ElementArrayStim(mywin, units=‘height’, sizes=[stimSize, stimSize], elementTex=_TEX_1, elementMask=_MASK_1, colorSpace=‘rgb’,
nElements=4, xys=xys, oris=[180, -90, 0, 90])