
function spikeResp = ClassModel1(allStim)

xDim = 8;
kernelX = xDim;                 % spatial size of filter
kernelT = 6;                    % temporal size of filter
kernelSize = kernelX * kernelT;
nFrames = size(allStim,1);

rate = 1/12;
base = 1/200;
p = 2;
th = pi/4;
rate = 1/6;
base = 00;
itau = 1.2;  sig=1.6; per=4.5;
[X,Y] = meshgrid([1:kernelX]-(kernelX+1)/2,[kernelT:-1:1]);
v1 = exp(-X.^2/(2*sig^2)) .* exp(-itau*Y) .* Y.^2 .* ...
     mkSine([kernelT,kernelX],per,pi/4,1,0);
clear modelFilts;
modelFilts(:,:,1) = v1;
v1=vectify(v1)/sqrt(var2(v1));
linResp = base + rate * max((allStim*v1),0).^p;
linResp = 20*linResp/max(linResp);
spikeResp = (linResp > rand(nFrames,1));
spikeResp(1:(kernelT-1)) = 0;  % can't use these


