p wave correspond to polarization 1 (psi =90,Ex polarization)
( Result_TRSpectrum_p1.csv
s wave correspond to polarization 2 (psi=0,Ey polarization)
(Result_TRSpectrum_p2.csv
% This program is an example to use thin film model. The design if a
% broadband reflector for the visible region of design.
% Data resource: Figure 4-27 in "Optical thin film"
% initial program
clear all;
close all;
um = 1e-6;
nm = 1e-9;
% define admittance for medium
Air = 1;
Glass = 1.52;
% define the reference wavelength and thickness
lambda_f = 880*nm;
% define visible region of light
lambda = linspace(200,1500,501)*nm;
% define thin film structure
y_inc = Air; % incident medium admittance
y_sub = Air; % substrate medium admittance
theta = 60; % in degree
%d = film thickness
%y = index for d, n-ik
d=[100*nm;200*nm;300*nm;];
y=[1.25;1.5;1.75;];
%rho= sqrt(R), complex reflection coefficient
%tao= sqrt(T), complex reflection coefficient
% y_inc|y|y_sub 共三層
for ii=1:length(lambda),
[rho(ii),tao(ii),R(ii),T(ii)] =multilayer_s(d,y,y_inc,y_sub,lambda(ii),theta);
end
% plot the result
figure;hold on;
plot(lambda/nm,R*1,'-k','LineWidth',3);
plot(lambda/nm,T*1,'-k','LineWidth',3);
title('A broadband reflector for the visible region');
xlabel('Wavelength(nm)');
ylabel('Reflectance(%)');
%axis([350 850 0 105]);
grid on;
for ii=1:length(lambda),
[rho2(ii),tao2(ii),R2(ii),T2(ii)] =multilayer_p(d,y,y_inc,y_sub,lambda(ii),theta);
end
% plot the result
figure;hold on;
plot(lambda/nm,R2*1,'-k','LineWidth',3);
plot(lambda/nm,T2*1,'-k','LineWidth',3);
title('A broadband reflector for the visible region');
xlabel('Wavelength(nm)');
ylabel('Reflectance(%)');
%axis([350 850 0 105]);
grid on;