import math
#variable declaration
n1 = 1.48 #core refractive index for glass n1
n2 = 1.00 #core refractive index for air n2
#calculation
phic = math.asin(n2/n1) #Interflaction reflaction angle(degree)
#result
print "Total Interflaction reflaction angle = ",round(phic*57.3,1),"degree"
import math
#variable declaration
n1=1.48 #core refractive index
n2=1.46 #cladding refractive index
#calculation
phiC=math.degrees(math.asin(n2/n1)) #critical angle (degree)
NA=math.sqrt((n1*n1)-(n2*n2)) #numerical apperture
phiO=math.degrees(math.asin(NA)) #maximum entrance angle (degree)
#result
print "Critical angle =" ,round(phiC,1),"degree"
print "Numerical apperture =" ,round(NA,3)
print "Acceptance angle =" ,int(phiO),"degree"
import math
#variable declaration
V=26.6 #normalized frequency
lamda=1300*1e-9 #wavelength(nm)
a=25*1e-6 #core radius(um)
#caculation
NA=(V*lamda)/(2*math.pi*a) #numerical aperture
#result
print "Numerical aperture =",round(NA,2)
import math
#variable declaration
V2 = 22 #normalized frequency2
V1=39 #normalized frequency1
p=1.4
#calculation
M1=(V1**2)/2 #modes in fiber1
M2=V2**2/2 #modes in fiber2
Pcladd_P1 = (4/3)*(M1**(-0.5))*p
Pcore_P1= 1-Pcladd_P1
Pcladd_P2 = (4/3)*(M2**(-0.5))*p
Pcore_P2= 1-Pcladd_P2
#result
print 'case1 : Total number of modes',M1
print 'case1 : Percent age of power propagates in the cladding',int(Pcladd_P1 *100)
print 'case2 : Total number of modes',M2
print 'case2 : Percent age of power propagates in the cladding',int(round(Pcladd_P2 *100,0))
import math
#variable declaration
lamda=1300*1e-9 #wavelength(nm)
Lp=8*1e-2 #beat length(cm)
#calculation
Bf=lamda/Lp #modal birefringence
bita=(2*math.pi)/Lp #birefringence(1/m)
#result
print "Modal birefringence =",round(Bf,7)
print "Birefringence Bita =",bita,"1/m"