Processing/BrightnessTemperature: l_band.pro

File l_band.pro, 600 bytes (added by peland, 11 years ago)

Calculates radiance of a sensor with known response as a function of temperature

Line 
1function l_band,lambda,response,t
2
3; black body radiance (W/m2/sr/um) due to instrument with response curve
4; response(lambda) (lambda in nm, response relative) at temperature(s) t (K)
5
6check=check_math()
7if (check and not 32) ne 0 then stop
8lambda_m=lambda*1e-9
9n_lambda=n_elements(lambda)
10n_t=n_elements(t)
11int_response=int_tabulated(lambda,response)
12l=fltarr(n_t)
13rl=fltarr(n_lambda)
14for i=0,n_t-1 do begin
15  for j=0,n_lambda-1 do rl[j]=response[j]*lbb(lambda_m[j],t[i])
16  l[i]=int_tabulated(lambda,rl)/int_response
17  check=check_math()
18  if (check and not 32) ne 0 then stop
19endfor
20return,l
21
22end