from math import sqrt
D=10**9 #Given D value
l=2*(10**-6) #Wavelength in meter
A=25*(10**-6) #Area in meter square
db=10*(10**3) #Detection Bandwidth in hertz
#From equation 7.2
NEP=(sqrt(A*db))/D #Where NEP is the detector sensitivty
print "The Sensitivty of the device at this wavelength is "+str(NEP)+" W"
l=500*(10**-9) #Wavelength of radiation
P=1*(10**-6) #Given Power
q=0.5 #Quantam Efficiency
e=1.6*(10**-19) #Charge of a electron
h=6.63*(10**-34) #Plancks Constant
c=3*(10**8) #Speed of light
#From equation 7.9
i=(q*e*P*l)/(h*c) #Where i is the current generated
print "The Vaccum Photodiode Output Current is %.2e A"%(i)
from math import exp
from math import sqrt
A=1000*(10**-6) #Cathode Area
wf=1.25 #Work function in eV
T=300 #Cathod temperature in Kelvin
e=1.6*(10**-19) #Charge of the electron
k=1.38*(10**-23) #Boltzman Constant
a1=1.2*(10**6) #given constants
l=0.5*(10**-6) #Wavelength
q=0.25 #Quantam Efficiency
h=6.63*(10**-34) #Plancks Constant
c=3*(10**8) #Speed of light
f=1
#From equation 7.11
e1=(k*T)/e
e1=round(e1,3)
c2=(-1*wf)/e1
c2=round(c2,4)
c3=exp(c2)
it=a1*A*(T**2)*c3 #Where it is the current generated
print "The thermionic Emission Current is %.2e A"%(it)
#Using Equation 7.9
r=(q*e*l)/(h*c) #where r is the responsivity
r=round(r,2)
print "The Responsivity is "+str(r)+" A/W"
#Using Equation 7.13
W=(sqrt(2*it*e*f))/r #Where W is the minimum detectable power
print "The Minimum detectable Signal Power is %.3e W"%(W)
#Answer is misprinted in the book
from math import sqrt
T=300 #Temperature in kelvin
lr=10**3 #Load resistor
bw=10**3 #Bandwidth in hertz
k=1.38*(10**-23) #Boltzman Constant
i=10**-14 #Photomultiplier current
e=1.6*(10**-19) #Charge of a electron
g=10**7 #Photomultiplier Gain
#From equation 7.14
V=sqrt(4*k*T*bw) #where V is the shot noise voltge
#From equation 7.12
id=sqrt(2*i*e*bw) #where is the shot noise current
V1=id*g*lr #Where V1 is the voltage observed across load resistance
print "The RMS Value of the Voltage is %.2e V"%(V)
print "The Shot Noise Current is %.3e A"%(id)
print "The Shot Noise Voltage across load resistance is %.3e V"%(V1)
n3=1 #Given Energy Levels
n2=2
Lz=10*(10**-9) #Width of the well
m=9.1*(10**-31) #Mass of a electron
me=0.068*m
h=6.63*(10**-34) #Plancks Constant
c=3*(10**8) #Speed of light
e1=1.6*(10**-19) #Charge of electron
#By Equation 2.64
E=((h**2)/(me*8))*(((n2/Lz)**2)-((n3/Lz)**2)) #where E is the energy difference between the levels
E1=E/e1 #Converting it into electron volt
E1=round(E1,2)
l=(h*c)/E1 #where l is the optical wavelength
l1=l/e1
print "The Energy Difference between the two levels is "+str(E1)+" eV"
print "The Optical Wavelength is %.3e meters"%(l1)
from math import sqrt
from math import exp
#Taking Silicon Diode with N-region
V=100 #Applied Voltage
Nd=5*(10**21) #in terms of per meter cube
eo=8.85*(10**-12) #Absolute permittivity
er=11.7
e=1.6*(10**-19) #Charge of the electron
#using equation 7.31
xn=sqrt((2*eo*er*V)/(e*Nd))
ac=10**5 #Absorption Coefficient in terms of per meter
#ignoring fresnal reflection
f=1-exp(-1*xn*ac)
f=round(f,3)
print "The Depletion region thickness is %.2e m"%(xn)
print "The fraction of the incident radiation absorbed is %.2e"%(f)
from math import sqrt
it=2*(10**-6) #I-region thickness
A=(100*(10**-6))*(100*(10**-6)) #Given area in meter
lr=50 #Load resistor
v=10**5 #Saturation Velocity in Metre/second
er=12 #Given relative permittivity
k=8.85*(10**-12) #boltzman constant
t=it/v #Transit Velocity of electrons
#From equation 7.34
c=(A*k*er)/it #Where c is the device capacitance
trc=c*lr
ttotal=sqrt((t**2)+(trc**2)) #where ttotal is the total response time
print "The Device Capacitance is "+str(c)+" Farad"
print "The Total response time for the detector is %.3e seconds"%(ttotal)
t=5*(10**-6) #Thickness of the layer
Dc=3.4*(10**-3) #Where Dc is the Minority diffusion coefficient
#From equation 7.37
td=(t**2)/(2*Dc) #where td is the diffusion time
print "The Time taken for the excess carriers to diffuse the given distance is %.2e seconds"%(td)