%
%
% Optical Imaging and Spectroscopy
%
% David J. Brady
% Duke University
% www.opticalimaging.org
%
% Figure 9.12 and 9.13
%
%
% Ring pattern for a Fabry-Perot Spectrograph
%
%
%
%
% plot parameters
%
figure(1);set(gcf,'color','white');
X=.7; %focal lengths
N=2048; % samples per axis
xrange=linspace(0,X,N);
% 
% etalon parameters
%
d=50; %thickness in wavelengths
n=1; %index of refraction
%r=0.9; % reflectivity
F=10; %finesse
F=4*F^2/pi^2; % coefficient of finesse
hring=1./(1+F*sin(2*pi*d*sqrt(1-xrange.^2)).^2);
subplot(2,1,1);plot(xrange,hring,'-k');xlabel('x/F');
title('(a)');
%
% rings in x and lambda
%
nurange=linspace(.95,1.05,N);
hringnu=1./(1+F*sin(2*pi*d.*nurange).^2);
subplot(2,1,2);plot(nurange,hringnu,'-k');xlabel('\nu/\nu_o');
title('(b)');
[x,nu]=meshgrid(xrange,nurange);
hringnu=1./(1+F*sin(2*pi*d*nu.*sqrt(1-x.^2)).^2);
figure(2);set(gcf,'color','white');
imagesc(xrange,nurange,hringnu);colormap gray;
xlabel('x/F');ylabel('\nu/\nu_o');axis square;
%
%
% uniform sampling in u nu
%
nurange=linspace(1,1.5,N);
urange=linspace(1,2,N);
[u,nu]=meshgrid(urange,nurange);
hringnu=1./(1+F*sin(2*pi*d*nu.*u).^2);
figure(3);set(gcf,'color','white');
imagesc(urange,nurange,hringnu);colormap gray;
xlabel('u/u_o');ylabel('\nu/\nu_o');axis square;



