%
%       Tb.m
%
%   ....Demo script of radiance vs. brightness temperature.
%
%       Written by Von P. Walden
%                  4 February 1998


%
%  ....Plot radiance from a 300 K blackbody
%
wn = 1:1:3000;
B300 = planck_wn(300,wn);
plot(wn,B300)
pause

%
%   ....Determine the brightness temperature.
%
Tb = brittemp(wn,B300);
plot(wn,Tb)
axis([0 3000 299.9 300.1])
pause;

%
%   ....Determine the radiance for a gray body (e = 0.75)
%
e = 0.75;
B300e = B300*e;
plot(wn,B300, wn,B300e)
pause

%
%   ....Determine the brightness temperature of the gray body.
%
plot(wn,brittemp(wn,B300e))
pause

%
%   ....Determine the brightness temperature of an actual radiance measurement.
%
load may01_45.spc
wn = may01_45(:,1);
radiance = may01_45(:,2);
plot(wn,radiance)
pause

plot(wn,brittemp(wn,radiance))
