In [0]:
%matplotlib inline
In [0]:
import site,os
currdir=os.getcwd()
head,tail=os.path.split(currdir)
libdir=os.path.join(head,'lib')
site.addsitedir(libdir)
In [0]:
from matplotlib import pyplot as plt
import numpy as np
img = plt.imread('images/sat_problem.png')
fig,axis=plt.subplots(1,1,figsize=(6,6))
the_img=axis.imshow(img)
the_img.set_cmap('gray')
We need to find the limits of integration for $\theta$. Simple trig gives $\theta_{max} = tan^{-1} (25/400)$
In [0]:
theta_max=np.arctan(25./400.)
print "angle is %5.2f degrees" % (theta_max*180./np.pi)
In [0]:
#use the slide 8 formula
angle=2*np.pi*(-1)*(np.cos(theta_max) - 1)
print "angle is about %7.3f sr" % angle
In [0]:
#check vs. area/R^2
print "and here is the check %7.3g, not bad" % ((np.pi*25**2.)/400**2.,)
In [0]:
import site
site.addsitedir('/Users/phil/repos/a301_2014/lib')
from planck import planckwavelen
flux=planckwavelen(11.e-6,300.) #output is W/m^2/m binwidth
radiance=flux/np.pi #turn flux into radiance
delta_lambda=2.e-6 #bin is 2 microns wide
flux=radiance*angle*delta_lambda
print "answer is about %5.3e W/m^2" % flux
In [0]:
In [0]:
In [0]: