# 11: Fibre Optics and Holography¶

## Example number 11.1, Page number 11.6¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n1 = 1.55    #refractive index of core
n2 = 1.50    #refractive index of cladding

#Calculation
NA = math.sqrt(n1**2 - n2**2)
NA = math.ceil(NA*10**3)/10**3;   #rounding off to 3 decimals

#Result
print "numerical aperture is",NA

numerical aperture is 0.391


## Example number 11.2, Page number 11.6¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n1 = 1.563    #refractive index of core
n2 = 1.498;    #refractive index of cladding

#Calculation
NA = math.sqrt(n1**2 - n2**2)      #numerical aperture
NA = math.ceil(NA*10**4)/10**4;   #rounding off to 4 decimals
alpha_i = math.asin(NA)        #angle of acceptance(radians)
alpha_i = alpha_i*180/math.pi       #angle(degrees)
deg = int(alpha_i)
t = 60*(alpha_i-deg)
mint = int(t)       #angle(minutes)

#Result
print "the angle of acceptance is",deg,"degrees and",mint,"minutes"
print "answer given in the book differs due to rounding off errors"

the angle of acceptance is 26 degrees and 29 minutes
answer given in the book differs due to rounding off errors


## Example number 11.3, Page number 11.7¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
delta = 0.05     #difference in refractive indices of core and cladding
NA = 0.39    #numerical aperture

#Calculation
n1 = NA/math.sqrt(2*delta)     #refractive index of core
n1 = math.ceil(n1*10**4)/10**4;   #rounding off to 4 decimals

#Result
print "refractive index of the core is",n1

refractive index of the core is 1.2333


## Example number 11.4, Page number 11.7¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n1 = 1.563    #refractive index of core
n2 = 1.498    #refractive index of cladding

#Calculation
delta = (n1-n2)/n1      #fractional index change
delta = math.ceil(delta*10**4)/10**4;   #rounding off to 4 decimals

#Result
print "fractional index change is",delta

fractional index change is 0.0416


## Example number 11.5, Page number 11.8¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
n1 = 1.48    #refractive index of core
n2 = 1.45    #refractive index of cladding

#Calculation
NA = math.sqrt(n1**2 - n2**2)     #numerical aperture
NA = math.ceil(NA*10**4)/10**4;   #rounding off to 4 decimals
alpha_i = math.asin(NA)      #angle of acceptance(radian)
alpha_i = alpha_i*180/math.pi       #angle(degrees)
deg = int(alpha_i)
t = 60*(alpha_i-deg)
mint = round(t)       #angle(minutes)

#Result
print "numerical aperture is",NA
print "the angle of acceptance is",deg,"degrees and",mint,"minutes"

numerical aperture is 0.2965
the angle of acceptance is 17 degrees and 15.0 minutes


## Example number 11.6, Page number 11.15¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
Pin = 100          #power of signal(mW)
Pout = 40          #outcoming signal power(mW)

#Calculation
l = -10*math.log10(Pout/Pin)       #attenuation loss(dB)
l = math.ceil(l*10**2)/10**2;   #rounding off to 2 decimals

#Result
print "the attenuation loss is",l,"dB"

the attenuation loss is 3.98 dB