function [blurred]=blur(clean,psfsize)

ysize=size(clean,1);
xsize=size(clean,2);
maxsize=max([ysize xsize]);

psf=make_psf(psfsize);

PSF=fft2(psf,2*maxsize,2*maxsize);
CLEAN=fft2(clean,2*maxsize,2*maxsize);
H=PSF.*CLEAN;

h=ifft2(H);
blurred=abs(h(1:ysize+psfsize,1:xsize+psfsize));



function [matrix]=make_psf(psfsize)

x=-0.1:(0.2/(psfsize-1)):0.1;
y=pdf('Normal',x,0,0.07);
y=y'*y;
matrix=y/sum(sum(y));
