% creates _ images (original + 2d affines)
% for figure to illustrate affine scafun in tf space
% with the Gabor chirplet (``gaborlet'')
% which has only 4 degrees of freedom
%
% this fig not used, since it is kind of redundant

npts = 200; % must be even
M = 100;
N = 100;  % must be even

s_short = gabor(0,.05,0,0,npts);  % most rect looking one

padl = zeros(npts,1);
padr = zeros(npts,1);

s = [padl; s_short ; padr];
SS = tf(s,M,N);  % complex for colour plot if desired

s_transt = [zeros(npts*3/2,1); s_short ;zeros(npts/2,1)];
% translated to right a bit
SS_transt = tf(s_transt,M,N);
% ALTERNATE FORMULATION (equivalent)
%S_transt = freqshift(fftshift(fft(s)),-.1); % tone (chirp with a=0) in Freq dom
  % note that a negative freq tone was needed to shift to right
%s_transt = ifft(fftshift(S_transt));
%SS_transt = tf(s_transt,M,N);

s_transf = freqshift(s,.3); % freq shifted up
SS_transf = tf(s_transf,M,N);

s_dil = gabor(0,.12,0,0,npts);  % dilt and dilf both dil
SS_dil = tf(s_dil,M,N);

s_rot = freqshift(gabor(0,.03,0,0,npts),-.5,.5); % rot = contract then shear
SS_rot = tf(s_rot,M,N);

disp('generated TF signals')

%dispmat(SS)
%dispmat(SS_transt)
%dispmat(SS_transf)
%dispmat(SS_dilt)
%dispmat(SS_dilf)
%dispmat(SS_sheart)
%dispmat(SS_shearf)

save

