etalon.nb

nm=(10^(-9));cm=(10^(-2));mm=(10^(-3));um=(10^(-6));
fs=(10^(-15));ps=(10^(-12));
c=3 (10^8);

fresnel equations for dielectric interface r and t

Snell's Law for transmitted angle: this is imaginary for incident angle greater than the critical angle for TIR

thT[thI_,nI_,nT_]:=ArcSin[nI Sin[thI]/nT];

transmission:

tParall[nIncid_,nTransm_,thIncid_,thTransm_]:=((2 nIncid Cos[thIncid])/(nTransm Cos[thIncid]+nIncid Cos[thTransm]));
tPerp[nIncid_,nTransm_,thIncid_,thTransm_]:=((2 nIncid Cos[thIncid])/(nIncid Cos[thIncid]+nTransm Cos[thTransm]));

reflection

rParall[nIncid_,nTransm_,thIncid_,thTransm_]:=((nTransm Cos[thIncid]-nIncid Cos[thTransm])/(nTransm Cos[thIncid]+nIncid Cos[thTransm]));
rPerp[nIncid_,nTransm_,thIncid_,thTransm_]:=((nIncid Cos[thIncid]-nTransm Cos[thTransm])/(nIncid Cos[thIncid]+nTransm Cos[thTransm]));

power transmission coeff
T=((Abs[t])^2) Re[(((Subscript[n, t])Cos[(Subscript[θ, t])])/((Subscript[n, i])Cos[(Subscript[θ, i])]))]

TParall[nIncid_,nTransm_,thIncid_,thTransm_]=((Abs[tParall[nIncid,nTransm,thIncid,thTransm]])^2)Re[((nTransm Cos[thTransm])/(nIncid Cos[thIncid]))];
TPerp[nIncid_,nTransm_,thIncid_,thTransm_]=((Abs[tPerp[nIncid,nTransm,thIncid,thTransm]])^2)Re[((nTransm Cos[thTransm])/(nIncid Cos[thIncid]))];

power reflection coeff
R=((Abs[r])^2)

RParall[nIncid_,nTransm_,thIncid_,thTransm_]=((Abs[rParall[nIncid,nTransm,thIncid,thTransm]])^2);
RPerp[nIncid_,nTransm_,thIncid_,thTransm_]=((Abs[rPerp[nIncid,nTransm,thIncid,thTransm]])^2);

plots

as θI goes to zero, these two expressions should be the same. But the sign convention we used for the directions of the fields was not consistent in this limit. 
note that the sign change corresponds to a phase change of 180degrees

n1Tst=1;
n2Tst=1.5;
θmin=0;θmax=90;

Print["Abs[t] (amplitude) parallel, P: blue, perpendicular, S: red"];
Plot[{
Abs[tParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]],Abs[tPerp[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]]},
{thItst,θmin,θmax},PlotRange->All,PlotStyle->{Blue,Red}]

sign convention for angles results in opposite sign for P and S at θ = 0

Print["Abs[r] (amplitude) parallel, P: blue, perpendicular, S: red"];
Plot[{
rParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]],rPerp[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]},
{thItst,θmin,θmax},PlotRange->{-1,1},PlotStyle->{Blue,Red}]

Print["T (power) parallel, P: blue, perpendicular, S: red"];
Plot[{
TParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]],TPerp[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]},
{thItst,θmin,θmax},PlotRange->{0,1},PlotStyle->{Blue,Red}]

Print["R (power) parallel, P: blue, perpendicular, S: red"];
Plot[{
RParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]],RPerp[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]},
{thItst,θmin,θmax},PlotRange->{0,1},PlotStyle->{Blue,Red}]

R+T = 1

Print["R + T = 1"];
Plot[{
TParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]],RParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]],
TParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]+RParall[n1Tst,n2Tst,thItst °,thT[thItst °,n1Tst,n2Tst]]},
{thItst,θmin,θmax},PlotRange->{0,1.01},PlotStyle->{Blue,Red,Gray}]

etalon functions

dTst=0.01mm;

Plot[(1/(1+ 10((Sin[etPhase[ωFromλ[λ nm],dTst,0]])^2))),{λ,500,510}]

Plot[etalonT[etPhase[ωFromλ[λ nm],dTst,0],10],{λ,500,510}]

θinc

coeffFinesse[RTst]

λRange=20nm;

Plot[etalonT[etPhase[ωFromλ[λ nm],dTst,θinc],10],{λ,(λ0-λRange)/nm,(λ0+λRange)/nm},PlotRange->{0,1}]

ωFromλ[λ_]:=((2 π c)/λ);

etalonT[del_,F_]:=(1/(1+F ((Sin[del/2])^2)));
finesse[r_]:=(((((2 r)/(1-(r^2)))))^2); (* amplitude r here *)
coeffFinesse[R_]:=((4 R)/(((1-R))^2));
finesse[R_]:=(π/(2 ArcSin[1/(Sqrt[coeffFinesse[R]])]));
etPhase[ω_,d_,thI_]:=2 (ω/c)n d Cos[thT[thI,n]];
etFSRλ[λ0_,d_,thI_]:=(c/(2 n d Cos[thT[thI,n]]))(((λ0)^2)/c);

 (* this etalon phase doesn't account for the dispersion of the material *)
phiEt[λ_,d_,a_]:=Block[{ap,r12,r23},
ap:=thT[a,n];
r12:=rp[1,n,a,ap];
r23:=rp[n,1,ap,a];
ArcTan[Tan[((2 π)/λ) n d Cos[ap]](((1-r12*r23))/((1+r12*r23)))]
];
etBeamDispl[d_,thI_]:= 2 d Tan[thT[thI,n]]Cos[thI];

these definitions are made in Fresnel coeff calcs above

thT[thI_,n_]:=ArcSin[Sin[thI]/n];
rp[n1_,n2_,theta1_,theta2_]:=((n2 Cos[theta1]-n1 Cos[theta2])/(n2 Cos[theta1]+n1 Cos[theta2]));

transmission

n=1.5;
λ0=500 nm;
λRange=1nm;
RTst=0.9;
θinc=0 Degree;
dMin=0.01mm;dMax=1mm;

Print["coeff finesse: ",coeffFinesse[RTst]];
Print["finesse: ",finesse[RTst]];
Print["transmitted angle: ",thT[θinc,n]/Degree," deg"];
Print["FSR: ",etFSRλ[λ0,dMax,θinc]/nm," nm"];
Print["delay time: ", (2 n dMax Cos[thT[θinc,n]])/c/ps," ps"];
Print["etalon beam displacement: ",etBeamDispl[dMax,θinc]/um," microns"];

Manipulate[
Plot[etalonT[etPhase[ωFromλ[λ nm],d mm,θ Degree],coeffFinesse[R]],{λ,(λ0-λRange)/nm,(λ0+λRange)/nm},PlotRange->{0,1}],
{d,dMin/mm,dMax/mm},
{R,0.1,1},
{θ,0,90}
]

dEtalon=1 cm;rEt=0.9;
thMax=1 °;
DensityPlot[etalonT[etPhase[ωFromλ[λ0],dEtalon,thMax (Sqrt[(x^2)+(y^2)])],finesse[rEt]],{x,-1,1},{y,-1,1},PlotPoints->70,PlotRange->{0,1}]