In [1]:

```
lw=1.1*(10**11) #Fluorescent Linewidth in Hertz
l=0.1 #length of laser rod in meter
n=1.8 #given Refraction Index
c=3*(10**8) #Speed of light
ms=c/(2*l*n) #where ms is the mode seperation in hertz
ms=round(ms,0)
ps=1/ms #where ps is the Pulse seperation in seconds
Nm=lw/ms #where Nm is the Number of modes oscillating
Nm=round(Nm,0)
pd=(1/Nm)*ps #where pd is the pulse duration
print "The Mode Seperation is "+str(ms)+" Hertz"
print "The Pulse Seperation is %.2e seconds"%(ps)
print "The Number of Modes Oscillating is "+str(Nm)
print "The Pulse Duration is %.1e seconds"%(pd)
```

In [2]:

```
#In a typical Laser
N1=10**24 #in per meter cube
v=5*(10**14) #Frequency in hertz
vo=(10**-5) #Volume in per meter cube
h=6.63*(10**-34) #Plancks Constant
#Assuming Nf<<<<N1
E1=0.5*(h*v*N1*vo) #Where E is the Energy of the pulses
E1=round(E1,1)
print "The Energy of the Pulse is "+str(E1)+" J"
```

In [3]:

```
#Using the Energy of the pulses from the above example
E=1.657 #Energy of the pulses in Joules
l=0.1 #Cavity length in meter
r=0.8 #Mirror reflectance
c=3*(10**8) #Speed of light
tc=l/((1-r)*c) #where tc is the cavity lifetime
P=E/tc #where P is the pulse power
print "The Cavity Lifetime is %.1e seconds"%(tc)
print "The Pulse Power is "+str(P)+" W"
```

In [4]:

```
#Considering a He-Ne Laser
d=3*(10**-3) #Diameter in meter
l=633*(10**-9) #Wavelength of the laser
theta=l/d #where theta is the divergence of the beam
print "The Divergence of the Beam is "+str(theta)+" Radians"
#After Collimation
theta=theta/30 #Reduced by a factor of 30
print "After Collimation,The angle of Divergance is reduced to %.2e Radians"%(theta)
```

In [5]:

```
#Assuming all lights from a Sodium Lamp
l=589*(10**-9) #Given Wavelength in meter
lw=5.1*(10**11) #Given Linewidth in Hertz
c=3*(10**8) #Speed of light
#By equation 6.9
tc=1/lw #Where tc is the cavity lifetime
#By Equation 6.8
Lc=tc*c #Where Lc is the length of the Wave Train
Lc=round(Lc,4)
print "The Cavity lifetime is %.1e seconds"%(tc)
print "The Length of the Wave Train or the Coherance Length is "+str(Lc)+" meter"
print "Under Multi Modes,The Linewidth is about 1500 MHz and Coherance Length is 0.2 m"
print "Under Single Mode,The Linewidth is about 1Mhz and the Coherance Length is 300 m"
```

In [6]:

```
P=10*(10**-3) #Given Power of the He-Ne Laser
F=1 #Given F Number
l=633*(10**-9) #Wavelength of the laser
PI=3.14
#From equation 6.10a
rs=(2/PI)*l*F #where rs is the radius of the focused spot
P1=(P*PI)/((2*l)**2) #Where P1 is the Power per unit area
print "The Radius of the Focused Spot is %.2e meter"%(rs)
print "The Power Per unit Area is "+str(P1)+" Watt per meter square"
```

In [7]:

```
from math import sqrt
#Given a Carbon Dioxide Laser Beam
l=10.6*(10**-6) #Wavelength in meter
d=50*(10**-3) #diameter in meter
fl=200*(10**-3) #Focal Length
PI=3.14
#Using Equation 6.10
rs=wo=(l*fl)/(PI*(d/2)) #where rs is the radius of the focused spot
#Given that spot size can be toletated by 10 percent
dw=1.1
w=1
#using equation 6.11
z=((PI*(rs**2))*sqrt((dw**2)-(w**2)))/l #where z is the depth of focus
print "The Radius of the Focused spot is %.2e meter"%(rs)
print "The depth of the Focus is %.2e meter"%(z)
#Answer is misprinted in the book
```