But the resulting stimulus actually looks as though it has more extreme unwanted oscillations. it's as though the stimulus is somehow tiling the patch in a way I wasn't intending, but in the code snippet to create the stim object, I specify only 1 angular and radial cycle of the texture --- checkerboard = visual.RadialStim(win, tex = texture, color=1, size=12,
import numpy, scipy.signalfrom numpy import piimport matplotlib.pyplot as plt
t= numpy.linspace(0,12,256) # timeline
## # Create expanding-freq y-axis sinusoid # # #f0y = .1 # begining freqt1y = 12 # time of reference freqf1y = 1 # reference freq
y = scipy.signal.chirp(t, f0y, t1y, f1y, method='logarithmic')ally = numpy.zeros((len(t),len(t)))for i in xrange(len(ally)): ally[:,i] = y #create cols of texture
allys = numpy.append(ally, ally, axis = 1) # this stuff is a dirty way to get the larger texturereversedy = numpy.flipud(allys) * -1 # this stuff is a dirty way to get the larger textureyTex = numpy.append(allys, reversedy, axis = 0) # this stuff is a dirty way to get the larger texture
## # Create standard x-axis sinusoidf0x = .5 t1x = 12f1x = .5 # freq is fixed at .5
x = scipy.signal.chirp(t, f0x, t1x, f1x, method='logarithmic')allx = numpy.zeros((len(t),len(t)))for i in xrange(len(allx)): allx[i,:] = x #create rows of texture
allxs = numpy.append(allx, allx, axis = 0)reversedx = numpy.fliplr(allxs)xTex= numpy.append(allxs, reversedx, axis = 1)### #
fullStim = xTex * yTex #combined sinusoid
texture = numpy.where(fullStim>0, 1, -1) #binarize full sinusoid pattern
texture2 = ally * allx # only one quarter of the full sinusoidtexture2 = numpy.where(texture2>0, 1, -1)
plt.imshow(texture)plt.show()plt.imshow(texture2)plt.show()