function CTF = ctf(R,Cs,lambda,dZ,w)

gamma = 180*lambda*(-dZ*abs(R).^2+Cs*10^6*abs(R).^4*lambda^2/2);
CTF = w*cosd(gamma)-sqrt(1-w^2)*sind(gamma);
end