# Chapter 2: Photons -- Particlelike Properties of Radiation¶

## Example 2.1, Page 29¶

In [1]:
import math

#Variable declaration
P=1#power in j/s

#Calculations
R=(P*math.pi*r**2)/(4*math.pi)#Rate at which energy falls in J/sec
R_e=3.4*10**-19#in Joule, rate at energy removed
t=R_e/R

#Result
print "Time required for energy to clear is %.1e sec"%t

Time required for energy to clear is 1.4e+02 sec


## Example 2.2, Page 31¶

In [2]:
#Variable declaration
h=6.63*10**-34#Joule-sec
vo=5.6*10**14

#Calculations&Results
w=h*vo
print "power is %.1e per sec"%w
ev=(1/(1.6*10**-19))
wo=w*ev
print "Energy is %.1f ev"%wo

power is 3.7e-19 per sec
Energy is 2.3 ev


## Example 2.3, Page 32¶

In [3]:
import math

#Variable declaration
p=1#j/s
h=6.63*10**-34#Joule-sec
c=3*10**8#m/sec
lamda=5.89*10**-7#m

#Calculations
R=p/(4*math.pi*r**2)
E=(h*c)/lamda
Rate_R=R*(1/E)

#Result
print "Rate at which photons strike unit area of place %.1e photons/m^2-sec"%Rate_R

Rate at which photons strike unit area of place 2.4e+17 photons/m^2-sec


## Example 2.4, Page 39¶

In [4]:
import math

#Variable declaration
h=6.63*10**-34#Joule-sec
c=3*10**8#m/sec
m_o=9.11*10**-31#in kg

#Calculations&Results
delta_h=(h*(1-math.cos(90*math.pi/180)))/(m_o*c)
print "Part(a)\nCompton shift is %.2e m"%delta_h

delta1=1*10**-10
K=(h*c*delta_h)/(delta1*(delta1+delta_h))
print "\nPart(b)\nX-ray beam is  %.2e Joule"%K
delta2=1.88*10**-12
K=(h*c*delta_h)/(delta2*(delta2+delta_h))
print "X-ray beam is  %.2e Joule"%K

E1=(h*c)/delta1
E1_ev=(6.241509*10**18)*E1
print "\nPart(c) \nX-ray energy is  %.1f keV"%(E1_ev/10**3)
E2=(h*c)/delta2
E2_ev=(6.241509*10**18)*E2
print "X-ray energy is  %.1f kev"%(E2_ev/10**3)
Per1=(100*.295*10**3)/E1_ev
Per2=(100*378*10**3)/E2_ev
print "Energy lost in percentage = %.1f "%Per1
print "Energy lost in percentage = %.f "%Per2

Part(a)
Compton shift is 2.43e-12 m

Part(b)
X-ray beam is  4.71e-17 Joule
X-ray beam is  5.96e-14 Joule

Part(c)
X-ray energy is  12.4 keV
X-ray energy is  660.3 kev
Energy lost in percentage = 2.4
Energy lost in percentage = 57


## Example 2.5, Page 42¶

In [5]:
#Variable declaration
e=1.6*10**-19#in coul
v=4*10**4#in V
lamda=3*10**-11#in m
c=3*10**8#m/sec

#Calculations
h=(e*v*lamda)/c

#Result
print "Planck's constant is %.2e Joule-sec"%h

Planck's constant is 6.40e-34 Joule-sec


## Example 2.6, Page 44¶

In [6]:
import math

#Variable declaration
e=1.6*10**-19#in coul
B=2*10**-1#weber/m2
r=2.5*10**-2#in m

#Calculations&Results
p=e*B*r
print "Momentum of electron %.1e Kg-m/sec"%p
x=1.5#in Mev, ie c^2*p^2
y=.51#in Mev
E_minus=math.sqrt(x**2+y**2)
E=2*E_minus#h*v
h=6.63*10**-34#Joule-sec
c=3*10**8#m/sec
lamda=(h*c)/(10**6*E*1.6*10**-19)
print "Photons wavelength is %.1e m"%lamda

Momentum of electron 8.0e-22 Kg-m/sec
Photons wavelength is 3.9e-13 m