function [x,y,ff1,ff2,f3] = vyp_PSF(FWHM,D,F)
c=FWHM/(2*sqrt(2*log(2)));
lim=1;
if D>lim
    lim=D;
elseif F>lim
    lim=F;
end
x=-lim:0.001:lim;
y=gaussmf(x,[c 0]);

uy=abs(y-0.5);
[f1 ff1]=min(uy(1:1000*lim));
[f2 ff2]=min(uy(lim*1001:end));
ff2=ff2+1001*lim;
f3(1:abs(ff2-ff1)+1)=0.5;

end
