#Variable declaration
y=630*10**(-9)#y=emitted wavelength in meters
c=3*10**8#c=velocity of light in free space in m/s
#Calculations&Results
v=c/y#v=frequency of the emitted radiation
print "The frequency of the emitted radiation is %.2e Hz"%v
h=6.62*10**(-34)#h=Planck's constant
P=1*10**(-3)#P=output power of gas laser(given)
n=P/(h*v)
print "The number of photons emitted per second is= %.2e s^-1"%n
#Variable declaration
V=500#V=bandwidth of a He-Ne laser in Hz
#Calculations&Results
t=1./V#t=coherence time
print "The coherence time is = %.f ms"%(t*(10**3))
c=3*10**8#c=velocity of light in m/s
Lc=c/V#Lc=longitudinal coherence length
print "The longitudinal coherence length is=%.f km"%(Lc/1000)
#Variable declaration
#To obtain interference fringes of good visibility the path difference for the central fringe must be an integral multiple of each of the 2 wavelengths.
#2*d=(n1*y1)=(n2*y2)where y1 & y2 are 2 wave-lengths and d=path difference and n1 and n2 are 2 integers
#(2*d)*((1/y2)-(1/y1))=(n2-n1)=m where m is another integer
#Now m=(-2*d*Y)/(y^2)=(2*d*V)/(v*y)=(2*d*V)/c=(2*d)/Lc
Lc=600.#Lc=coherence length in km
#Calculations
d=(Lc/2)#d=minimum difference between the 2 arms of the Michelson interferometer
print "The minimum difference between the two arms of the Michelson interferometer is=%.f km"%d
import math
#Variable declaration
h=6.62*10**(-34)#h=Planck's constant
v=3*10**8#v=velocity of light(as normal optical source is mentioned) in m/s
kB=1.38*10**-23#kB=Boltzmann's constant
T=1000#T=temperature in Kelvin
w=6000#w=wavelength in Armstrong
#Calculations&Results
R=(math.exp((h*v)/(w*(10**-10)*kB*T)))-1#R=the ratio of the number of spontaneous to stimulated transitions
print "R=%.1e"%R
if (R>1):
print "As the ratio of the number of spontaneous to stimulated transitions (R) is >> 1 the emission is predominantly",\
"\ndue to spontaneous transitions and is thus incoherent"
#Variable declaration
u=8./(10**14)#u=(V/v)=the short term frequency stability of a He-Ne gas laser
#v=c/y where c=velocity of light in vacuum and y=wavelength
c=3*10**8#c=velocity of light in m/s
y=1153*10**(-9)#y=emitted wavelength in meters
#Calculations&Results
V=(u*c)/y
t=1./V#t=coherence time
print "The coherence time is = %.f ms"%(t*(10**3))
Lc=c/V#Lc=coherence length
print "The coherence length is=%.2e m"%Lc
#Variable declaration
#y0=vacuum wavelength for the frequency v
#c=(v*y0)
#The deviation in the wavelength is Y0=(c*V)/(v**2)
#Y0=((y0**2)*V)/c
#V being spread in frequency over the linewidth.
#V=(1/tc)
c=3*(10**8)#c=velocity of light in m/s
tc=10**(-8)#tc=coherence time in seconds
y0=650*(10**(-9))#y0=vacuum wavelength in m
#Calculations&Results
Y0=(y0**2)/(c*tc)
print "Line width is =%.1e nm"%(Y0/(10**-9))#Y0 is converted in terms of nm
Lc=c*tc#Lc=coherence length
print "The coherence length Lc is=%.f m"%Lc
import math
#Variable declaration
o=5*10**-5#o=angular spread in radians
f=10#f=focal length in cm
#Calculations&Results
D=f*o#D=diameter of the image
r=(D/2)#r=image radius
print "The image radius is = %.1e cm"%r
a=math.pi*(r**2)#a=cross sectional area of the image in cm**2
P=10*10**-3#P=power in Watts
PD=P/a#PD=power density
print "Power density is = %.1e W/cm**2"%PD
y=6000*10**-8#y=wavelength in cm
d=y/o#d=coherent width
print "The lateral coherent width is = %.1f cm"%d
#Variable declaration
h=6.62*10**-34#h=Planck's constant
c=3*10**8#c=velocity of light in vacuum in m/s
y=632.8*10**-9#y=emitted wavelength in m
#Calculations
E=(h*c)/y#E=emitted photon energy in Joules
e=15.2*10**-19#e=energy of 2p level in Joules
P=E+e#P=Pumping energy required for transition from 3s to 2p level in a He-Ne laser
#Result
print "The desired pumping energy is = %.1f eV"%(P/(1.6*10**-19))
import math
#Variable declaration
h=6.62*10**-34#h=Planck's constant
v=2.4*10**15#v=frequency of emitted radiation in Hz
c=3*10**8#c=velocity of light in vacuum in m/s
#Calculations
A21=1/(1.66*10**-8)#A21=mean spontaneous life time
B21=((c**3)*A21)/(8*math.pi*h*(v**3))#B21=probability of stimulated emission
#Result
print "The desired probability is = %.2e m**3/(J.s**2)"%B21
import math
#Variable declaration
u1=1.55#u1=refractive index of the core of the fibre
u2=1.50#u2=refractive index of the cladding
#Calculations&Results
oa=math.asin(math.sqrt((u1**2)-(u2**2)))#oa=acceptance angle
print "The acceptance angle is = %.f degrees"%math.degrees(oa)
NA=math.sin(oa)#NA=numerical aperture
print "NA=%.4f"%NA
oc=math.asin(u2/u1)#oc=critical angle
print "Critical angle=%.f degrees"%math.degrees(oc)
d=50*10**-6#d=core diameter in meters
x=d*math.tan(oc)#x=axial distance traversed by the ray between two consecutive reflections
n=1/x#n=number of reflections per metre
print "The number of reflections per metre is = %.f"%n
import math
#Variable declaration
ro = 0.2 #mm
u1 = 1.52
#Calculations
n_ro = 1.52-(2*ro**2)
NA = math.sqrt(u1**2-n_ro**2)
theta_A = math.degrees(math.asin(NA))
#Results
print "Numerical Arperture = %.4f"%NA
print "Acceptance angle = %.2f degrees"%theta_A