1 %# csq=csquare2(beta,f,g) returns cos(pi*beta*(f^2+g^2))
2 %# beta is equal to lambda*D/l^2, i.e. the Fresnelnumber
3 %# for the complete spectrum (from 0 to fsample)
5 %# only f and g from 0 to fsample/2 should be given, the other part is
6 %# calculated using the periodicity in frequency-space
8 %# complete frequency range is given
9 %# allows for astigmatism (5th argument)
11 function csq=csquare2(betah,f,g,varargin)
18 f_isall = varargin{1};
21 f_isall = varargin{1};
25 csq=cos((pi*betah)*f.^2+(pi*betav)*g.^2);
31 csq=cat(2,cat(1,csq,flipdim(csq(2:n,:,:),1)),cat(1,flipdim(csq(:,2:m,:),2),flipdim(flipdim(csq(2:n,2:m,:),1),2)));