Calculates the reflection and transmission of a plane wave through a multi-layer stack using the analytic transfer matrix method. This function returns the fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and the complex reflection and transmission coefficients (ts, tp, rs, rp), for both S and P polarizations. All results are returned in a single dataset as a function of frequency and incidence angle (optional).
To calculate the fields within the stack, please see stackfield .
Syntax |
Description |
---|---|
RT = stackrt(n,d,f); |
n: Refractive index of each layer. Size can be
d: Thickness of each layer. Size is Nlayers. f: Frequency vector with a length of Nfreq. |
RT = stackrt(n,d,f,theta); |
theta: Angle vector, in degrees. Optional. |
For more information on the complex coefficients see Stack optical solver overview.
Example
Calculate the reflection, transmission, and field distribution from a 5 layer stack.
f = linspace(c/400e-9, c/1000e-9,100); # frequency vector
theta = 0:1:45; # angle vector
d = [0; 200e-9; 300e-9; 400e-9; 0]; # 5 layers (including air on top and bottom)
nf = length(f);
nd = length(d);
# refractive index of each layer (non-dispersive)
n1 = [1; 1.5; 2.5; 1.5; 1];
# refractive index of each layer (dispersive)
n2 = matrix(nd,nf);
n2(1,1:nf) = 1; # air
n2(2,1:nf) = getfdtdindex("SiO2 (Glass) - Palik",f,min(f),max(f));
n2(3,1:nf) = getfdtdindex("Si (Silicon) - Palik",f,min(f),max(f));
n2(4,1:nf) = getfdtdindex("SiO2 (Glass) - Palik",f,min(f),max(f));
n2(5,1:nf) = 1; # air
RT1 = stackrt(n1,d,f); # non-dispersive index data, and theta=0
RT2 = stackrt(n2,d,f,theta); # dispersive data index data, and theta from 0 to 45 deg
visualize(RT1);
visualize(RT2);
plot(RT1.lambda*1e6,RT1.Rp,RT1.Rs,RT1.Tp,RT1.Ts,"wavelength (um)","Power","non-disperisive, theta=0");
legend("Rp","Rs","Tp","Ts");
image(RT2.lambda*1e6,RT2.theta,RT2.Rp,"wavelength (um)","theta (deg)","Rp, dispersive example");
Here's an example for a birefringent slab in air:
N_layers = 3;
Nfreqs = 100;
n = matrix(N_layers, Nfreqs, 3);
n(1, :, :) = 1; # air
n(2, :, 1) = 2.1; # nx
n(2, :, 2) = 2.1; # ny
n(2, :, 3) = 2.5; # nz
n(3, :, :) = 1; # air
d = [0; 1e-6; 0]; # air/ birefringent slab / air
f = linspace(c/1e-6, c/1.5e-6, Nfreqs);
theta = 0:1:45;
RT = stackrt(n,d,f,theta);
visualize(RT);
See Also
List of commands , stackfield , multilayer stack calculations , getfdtdindex , visualize