%
%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure 9.3
%
% 
% STF of coded aperture dispersive spectrometer
%
slitW=2; % lambda f/#
pixelW=1; % 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]);