function [Tb, e, Teff] = theoretical_Tb(eps1, eps2, loss_tan, h, inc, pol, lat, t)
%returns a theoretical brightness temperature based on Le Gall Composition,
% seasonal change, and bathymetry of Ligeia Mare, Titan, derived from its
%microwave thermal emission
%applied to the plains

%inc and pol are angles in rad
%lat in deg
%t in cassini standard ephem time, seconds since J2000


fractional_year = (t ./31556952) + 2000;
T1 = 86.1 + 7.47.*0.87.*cos(0.0106.*(lat-(5.18.*(fractional_year - 2009.61)-2.98)));
T2 =  T1;
Teff = T1;

G1 = fresn(1, eps1, inc, pol); %Fresnel air to medium
G2 = fresn(eps1, eps2, inc, pol); %Fresnel medium to baselayer

inc_prime = asin(sin(inc)./sqrt(eps1));

skin_depth = (0.0217./4.*pi)./sqrt((eps1./2).*(sqrt(1+loss_tan.^2)-1));
L1 = exp(-h./(skin_depth.*cos(inc_prime)));

Tb =  ((1-G1)./(1-G1.*G2.*L1.^2)).*(((1+G2.*L1).*(1-L1).*T1)+((1-G2).*L1.*T2));
e =  ((1-G1)./(1-G1.*G2.*L1.^2)).*(((1+G2.*L1).*(1-L1))+((1-G2).*L1));


end
