%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure 9.3
%
% 
%
% STF of dispersive spectrometer
%
% slit width 25 lambda, pixel size 10 lambda
%
%
%
slitW=25; % lambda f/#
pixelW=5; % lambda f/#
u=linspace(0,1,512);
figure(1);set(gcf,'color','white');
subplot(2,1,1);plot(u,[otf(u);abs(sinc(pixelW*u));abs(sinc(slitW*u))],'-k');xlabel('u (F/(\Lambda \lambda f/#))');title('(a)');
subplot(2,1,2);plot(u,otf(u).*abs(sinc(pixelW*u)).*abs(sinc(slitW*u)),'-k');xlabel('u (F/(\Lambda \lambda f/#))');title('(b)');
line([1/(2*pixelW),1/(2*pixelW)],[0,1]);
