% % Optical Imaging and Spectroscopy % % David J. Brady % Duke University % www.opticalimaging.org % % Figure 6.17 % % % interesting otf's % % units are inverse wavelengths % fnumber=1; apertureRange=linspace(-2,2,128); [x,y]=meshgrid(apertureRange,apertureRange); figure(1);set(gcf,'color','white'); colormap(1-gray(256)); fNumber=1; field=sqrt(x.^2+y.^2); h=P(field*fNumber); H=conv2(h,h,'same'); H=H/max(max(H)); subplot(2,2,1);imagesc(apertureRange,apertureRange,h); title('Pupil function');axis square; subplot(2,2,2);imagesc(apertureRange,apertureRange,H); title('Modulation transfer');axis square; subplot(2,2,4);plot(apertureRange,H(64,:),'-k'); xlabel('1/wavelength');title('MTF cross section'); fourierRange=linspace(-5,5,128); subplot(2,2,3);plot(fourierRange,jinc(fourierRange./fnumber).^2,'-k'); xlabel('wavelengths');title('Impulse response');