% Plot the result of the routines tLS_comp.m and Fq_comp.m.
%
% Samuli Siltanen May 2012

% Plot parameters
lwidth = 2;
fsize  = 16;

% Load precomputed data
load data/tLS tLS kvec
load data/Fq Fq

% Create plot window
figure(1)
clf;

% Plot the real and imaginary parts of the scattering transform. The
% imaginary part should be zero. Also, the real part should tend to zero as
% k->0, if this is not the case then too coarse a grid has been used in the
% routine tLS_comp.m.
plot(kvec,real(tLS),'b','linewidth',lwidth)
hold on
plot(kvec,imag(tLS),'r','linewidth',lwidth)
plot(kvec,real(Fq),'k--','linewidth',lwidth/2)
xlim([0 15])
set(gca,'xtick',[0:5:15],'fontsize',fsize)
legend('real(t(k))','imag(t(k))','F(q)(-2k_1,2k_2)')
box off

% Save image to file
%print -dpng tLS_Fq.png