% Plot the point spread function (PSF) used in the 1D deconvolution
% example. Routine DC1_cont_data_comp.m must be computed before this file.
% 
% Jennifer Mueller and Samuli Siltanen, January 2014

% Plot parameters. Modify only if the line width, font size or point size
% in the plots are not optimal.
fsize  = 16;
lwidth = 2;

% Load precomputed results
load DC_cont_data xx Af a Ca psf xxp

% Construct the target function
targ = DC_target(xx);

% Create plot window
figure(1)
clf

% Plot the target
subplot(2,1,1)
plot(xx,targ,'k','linewidth',lwidth)
hold on
plot(xx,Af,'r','linewidth',lwidth)

% Axis settings
axis([0 1 0 1.6])
box off
set(gca,'ytick',[0,.5,1,1.3,1.5],'fontsize',fsize)
set(gca,'xtick',[0,.5,1],'fontsize',fsize)
set(gca,'PlotBoxAspectRatio' , [2 1 1])

% Plot the point spread function
subplot(2,1,2)
plot(xxp,psf,'b','linewidth',lwidth)
xlim([-.5 .5])
set(gca,'PlotBoxAspectRatio' , [2 1 1])

