#calculate the cycles and wavelength
#Given :
lambda1 = 5890. ; # Wavelength in angstroms
lambda2 = 5896. ; # Wavelength in angstroms
#For sodium doublet
nu1 = 5.0934*10**14; #Frequency in Hz
nu2 = 5.0882*10**14; #Frequency in Hz
#calculations
deltanu = nu1-nu2; # Differnece in Frequencies in Hz
Tc = 1/deltanu ; # Coherence time in s
n1 = Tc*nu1; # Number of Cycles of wavelength 5890 angstroms
n2 = Tc*nu2;# Number of cycles of wavelegth 5896 angstrom
#in this coherence time , we have:
#results
print"Cycles :",round(n1),", Wavelength",lambda1,"A"
print"Cycles :",round(n2),", Wavelength",lambda2,"A"
#calculate the coherence length, bandwidth and degree of monochromaticity
#Given:
deltalambd1 = 0.01; # The line width of the orange line of krypton,Kr**86 in A
lambd = 6058; # Wavelength in angstroms = 6058*10**-10 m
deltalambd2 = 0.00015; # The line width of a laser source in A
c = 3*10**8 ;# Velocity of light in vacuum in m/s
#calculations
nu0 = c/(lambd*10**-10);
#For orange line of Krypton
Lc1= (lambd**2/deltalambd1)*10**-10; # coherence length in m
deltanu1 = c/Lc1 ;# bandwidth in Hz
Tc1 = (Lc1/c);# Coherence time in s
#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A
Xi1 = deltanu1/nu0 ; #degree of monochromaticity
#For Laser Source
Lc2= (lambd**2/deltalambd2)*10**-10;# coherence length in m
deltanu2 = c/Lc2 ;# in Hz
Tc2 = (Lc2/c);#Calculating Coherence time in s
#Xi = deltanu/nu0 , where nu0 = c/lambd which equals to (deltanu*lambd)/c, lambd in A
Xi2 = deltanu2/nu0 ;# degree of monochromaticity
#results
print"For Orange line of Krypton : Coherence Length : \t",round(Lc1*100,2)," cm \n Bandwidth : \t\t",round(deltanu1*10**-8,2)," x 10**8 Hz \n Coherence : \t\t",round(Tc1*10**8,2),"x 10**-8 s \n Degree of Monochromaticity : ",round(Xi1*10**6,2),"x 10**-6 "
print"For Laser Source : Coherence Length : \t",round(Lc2*100,2)," cm \n Bandwidth : \t\t",round(deltanu2*10**-8,2)," x 10**8 Hz \n Coherence : \t\t",round(Tc2*10**8,2),"x 10**-8 s \n Degree of Monochromaticity : ",round(Xi2*10**8,2),"x 10**-8 ",
#### calculate the optical path, no of waves and Phase difference
#(a)
#Given:
import math
lambd = 5890.;# Wavelength in A
l = 5.89; #thickness of the film in mu m
mu = 1.35; #refractive index
delta = mu*l;# optical path in the medium in m
#calculations
#(b) (i)Number of waves in the medium
#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m
N= (l*10**-6)/(lambd*10**-10/mu);
#the distance in vaccum for those waves :
delta1 =N*lambd*10**-10; # optical path in m
#(b) (ii)Phase difference in the medium
#1 angstrom = 1.0*10**-10 m and 1 mu m = 1*10**-6 m
phi = ((2*math.pi)/(lambd*10**-10/mu))*(l*10**-6) ;
#results
print"Optical path (mu m) = ",delta
print"Number of waves : ",N
print"The distance in vaccum for those waves is (mu m) = ",delta1*10**6
print"Phase difference = ",round(phi,0)
#pg 55
#calculate the Parameters required
#Given:
lambd = 5890.; # Wavelength of a beam of sodium light in A
l = 100.; # thickness in cm
mu1 = 1.00;#refractive index of air
mu2 = 1.33;# refractive index of water
mu3 = 1.39; # refractive index of oil
mu4 = 1.64; # refractive index of glass
c = 3.*10**8 ;# Velocity of light in vacuum in m/s
#calculations
#For Air :
lambd1 = lambd/mu1; # wavelength of light in A
v1 = c/mu1;# Velocity of light in air in m/s
# 1cm = 1*10**-2 m
t1 = (l*10**-2/v1); #time of travel in s
# 1 A = 1*10**-10 m
N1 = (l*10**-2)/(lambd1*10**-10);# Number of waves
delta1 = mu1*l; #Optical path in cm
#For Water :
lambd2 = lambd/mu2; # wavelength of light in A
v2 = c/mu2;# Velocity of light in water in m/s
#1cm = 1*10**-2 m
t2 = (l*10**-2/v2); #time of travel in s
#1 A = 1*10**-10 m
N2 = (l*10**-2)/(lambd2*10**-10);# Number of waves
delta2 = mu2*l; #Optical path in cm
#For Oil :
lambd3 = lambd/mu3; # wavelength of light in A
v3 = c/mu3;# Velocity of light in Oil in m/s
#1cm = 1*10**-2 m
t3 = (l*10**-2/v3); #time of travel in s
#1 A = 1*10**-10 m
N3 = (l*10**-2)/(lambd3*10**-10);# Number of waves
delta3 = mu3*l; #Optical path in cm
#For Glass:
lambd4 = lambd/mu4; # wavelength of light in A
v4 = c/mu4;# Velocity of light in Glass in m/s
# 1cm = 1*10**-2 m
t4 = (l*10**-2/v4); #time of travel in s
#1 A = 1*10**-10 m
N4 = (l*10**-2)/(lambd4*10**-10);# Number of waves
delta4 = mu4*l; #Optical path in cm
delta = delta1+delta2+delta3+delta4; # total optical path in cm
#results
print"Parameters \t\t\t Air \t\t\t Water \t\t\t Oil \t\t\tGlass "
print"Wavelength : \t\t",lambd1,"A \t\t",lambd2," A \t\t",lambd3," A \t\t",lambd4,"A "
print"Velocity : \t\t",v1*10**-8," x 10**8 m/s \t\t",round(v2*10**-8,2),"x 10**8m/s \t",round(v3*10**-8,2),"x 10**8 m/s \t",round(v4,2),"x 10**8 m/s "
print"Time of travel : \t ",round(t1*10**10,2),",x 10**-10 s\t",round(t2*10**10,2),"x 10**-10 s\t",round(t3*10**10,2),"x 10**-10 s\t",round(t4*10**10,2),"x 10**-10 s "
print"Number of waves: \t ",round(N1*10**-6,2),"x 10**6 \t\t",round(N2*10**-6,2),"x 10**6 \t\t",round(N3**10**-6,2)," x 10**6 \t\t",round(N4*10**-6,2),"x10**6 "
print"Optical path : \t\t ",delta1,"cm \t\t",delta2,"cm \t\t",delta3," cm \t\t",delta4,"cm "
print" The total optical path (cm) = ",delta
#calculate the maximum no. of fringes observable
#Given :
lambd = 6058;# Wavelength of light in A
deltalambd1 = 0.01; # line width for a krypton source in A
deltalambd2 = 0.00015; # line width for a laser source in A
#calculations
# The maximum number of fringes is given by n_max = lambd/deltalambd
# (a) For a krypton source :
n_max1 = lambd/deltalambd1 ;
# (b) For a laser source :
n_max2 = lambd/deltalambd2;
#results
print"The maximum number of fringes observable are :"
print"(a) For a krypton source : ",n_max1
print"(b) For a laser source : ",round(n_max2,0)
#calculate the max thickness
#Given :
mu = 1.4;# refractive index of a thin film
lambd = 5890; # Wavelength of sodium light in A
deltalambd = 20; #line width in A
#calculations
# For observing interference pattern, t < lambd**2/(2*mu*deltalambd)
t_max = lambd**2/(2*mu*deltalambd); #thickness of the film in A
#results
print " t_max :",round(t_max*10**-5,3),"x 10^5 A"
#calculate the wedge angle
#Given:
lambd = 6000.; # wavelength in A
mu = 1; #refractive index for air
# Fringe pattern having 100 fringes per cm
betaa = 0.01; # fringe width in cm
#calculations
# And,We know betaa = lambd/(2*mu*alpha) , so
# 1 A = 1.0*10**-8 cm
alpha = lambd*10**-8/(2*mu*betaa); # wedge angle in rad
#results
print"Wedge angle (rad) = ",alpha
#calculate the distance required
#Given :
import math
from math import sin
angle = 4*10**-2 ; # angle in rad
#calculations
#1 radian = 57.2957795 degrees
theta = angle ;# in degrees
# d*sin(theta) = lambd , so d = lambd/(sin(theta)) :
#(a)For Sound waves
lambd1 = 0.75; # Wavelength in m
d1 = lambd1/sin(theta); # distance in m
#(b)For Ultrasonic waves
lambd2 = 0.1; # Wwavelength in m
d2 = lambd2/sin(theta); # distance in m
#(c)For microwaves
lambd3 = 2.9 ; # Wavelength in cm
#1cm = 1.0*10**-2 m
d3 = lambd3*10**-2/sin(theta); # distance in m
#(d)For IR waves
lambd4 = 10; # Wavelength in mu_m
# 1 mu_m = 1.0*10**-6 m
d4 = lambd4*10**-6/sin(theta);# distance in m
#(e)For light waves
lambd5 = 5890;# in angstroms
#1 A = 1.0*10**-10 m
d5 = lambd5*10**-10/sin(theta); # distance in m
#results
print" (a)For Sound waves : (m) = ",round(d1,2)
print" (b)For Ultrasonic waves : (m) = ",round(d2,2)
print" (c)For Microwaves : (m) = ",round(d3,2)
print" (d)For IR waves : (mu m) = ",round(d4*10**6,1)
print" (e)For Light waves : (mu m) = ",round(d5*10**6,2)
#calculate the maximum and minimum intensity
#Given :
# Now, the intensity distribution is given by :
# I = I_1 + I_2 + 2*(I_1*I_2)**0.5 *cos(alpha1- alpha2) , Using alpha = alpha1 - alpha2 and I_1 = I_2 = I_0
# I = 2*I_0*(1+ cos(alpha))
import math
nu = 1.2 * 10**6 ; # frequency in Hz
c = 3*10**8 ; # velocity of light in m/s
#calculations
lambd = c/nu ; # wavelength in m
d = 500; # two identical vertical dipole antenna spaced 500 m apart
# Directions along which the intensity is maximum :
print "Maximum Intensity "
for n in range(0,3):
theta = math.asin((n*lambd)/d) *57.3;# in degrees
print "---> theta =",round(theta,0),"degrees"
# Directions for which intensity is minimum :
n1 =0;
theta1 = math.asin(((n1 + (1./2.))*lambd)/d) *57.3;#in degrees
#results
print"Minimum Intensity"
print"--> theta (degrees) = ",round(theta1,1)
#calculate the linear expansivity of the metal
#Given :
lambd = 5900. ; #Wavelength in A
delta_T = 150.; # Temperature of the metal cylinder is now raised by 150 K
p = 20. ; # p is the number of rings shifted due to increase in t_n (t_n is the thickness of the air film)
l = 5. ; # length of the metal cyclinder in mm
mu = 1.; #refractive index for air
#Increase in length = (p*lambd)/2*mu
# 1 A = 1.0*10**-7 mm
#calculations
delta_l = (p*lambd*10**-7)/2*mu; # increase in length in mm
#Linear expansivity of the metal of the cyclinder
alpha = (delta_l)/(l*delta_T); # in 1/K
#results
print"The linear expansivity of the metal of the cylinder using Newtons rings apparatus is :",round(alpha*10**6,1),"x 10^-6/K "
#calculate the wavelength
#Given :
d = 0.065; #distance in mm
p = 200 ;# 200 fringes cross the field of view
#Michelson's interferometer arrangement : 2*d = p*lambd
#calculations
lambd = 2*d/p;# wavelength in mm
#results
print" Wavelength :",lambd*10**4,"x 10^-4 mm "
#calculate the refractive index
#Given :
D10_air = 1.75 ;#diameter of the 10th bright ring in Newton's ring apparatus in cm
D10_liquid = 1.59 ; # diameter of the 10th bright ring in Newton's ring apparatus in cm
# The diameter of the nth bright ring in Newton's ring apparatus : D_n = 2*(R*(n + 1/2)*(lambd/mu))^0.5
#calculations
mu = (D10_air/D10_liquid)**2;
#results
print"The refractive index of the liquid is ",round(mu,3)
#calculate the minimum thickness and alpha values
#Given :
import math
from math import cos
lambd = 5500; # Wavelength in A
mu_f = 1.38; # refractive index for MgF2
mu_f1 = 1.48; # refractive index for lucite
#The minimum thickness
#calculations
t = lambd/(4*mu_f) ; # thickness in A
print"The minimum thickness (A) = ",round(t,1)
# Resultant reflected intensity = I = 2*I_0*(1 + cos(alpha))
# alpha = (2*pi/lambd)*(path difference)
alpha1 = (2*math.pi/lambd)*(2*mu_f*t); # angle in radians
alpha2 = (2*math.pi/lambd)*(2*mu_f1*t); # angle in radians
#results
print" alpha =",round(alpha1,2),"for MgF2 and",round(alpha2,2),"for lucite"
print" For MgF2 : I = (",2*(1+cos(alpha1)),")*I_0"
print" For lucite : I = (",round(2*(1+cos(alpha2)),3),")*I_0"
print"For Lucite : (",round(2*(1+cos(alpha2)),3),")*I_0 , indicates",round(100*2*(1+cos(alpha2)),2)," percentage of the incident light is reflected ,so it is less suitable for coating."