In [6]:

```
from math import *
#Variable declaration
mu_1 = 1.55; # Refractive index of the core
mu_2 = 1.50; # Refractive indices of cladding
#Calculations
NA = mu_1*sqrt(2*(mu_1-mu_2)/mu_1);
print "The NA of the optical fibre = %5.3f"%NA
theta_a = degrees(asin(NA)); # The acceptance angle of optical fibre, degrees
#Result
print "The acceptance angle of the optical fibre is = %.1f degrees"%theta_a
```

In [9]:

```
from math import *
#Variable declaration
mu_1 = 1.50; # Refractive index of the core
mu_2 = 1.45; # Refractive index cladding
#Calculations&Results
NA = mu_1*sqrt(2*(mu_1-mu_2)/mu_1); # Numerical aperture of optical fibre
print "The NA of the optical fibre = %5.3f"%NA
theta_a = degrees(asin(NA)); # The acceptance angle of optical fibre, degrees
print "The acceptance angle of the optical fibre = %5.2f degrees"%theta_a
theta_c = degrees(asin(mu_2/mu_1)); # The critical angle of the optical fibre, degrees
print "The acceptance angle of the optical fibre = %4.1f degrees"%theta_c
```

In [10]:

```
from math import *
#Variable declaration
mu0 = 1; # Refactive index of fibre in air
mu2 = 1.59; # Refactive index of the cladding
NA = 0.2; # Numerial aperture of optical fibre
#Calculations
mu1 = sqrt(NA**2+mu2**2); # Refractive index of core
mu0 = 1.33; # Refactive index of fibre in water
NA = sqrt(mu1**2-mu2**2)/mu0; # Numerial aperture of optical fibre in water
theta_a = degrees(asin(NA)); # Acceptance angle for the fibre in water
#Result
print "The acceptance angle for the optical fibre in water = %3.1f degrees"%theta_a
```

In [13]:

```
from math import *
#Variable declaration
mu0 = 1; # Refractive index of air
mu1 = 1.50; # Refractive index of glass core`
delta = 0.005; # Fractional change in refractive index
#Calculations&Results
mu2 = mu1*(1-delta); # Refractive index of cladding
print "The refractive index of cladding =%6.4f"%mu2
theta_c = degrees(asin(mu2/mu1)); # Critical angle, degrees
print "The critical angle = %5.2f degrees"%theta_c
theta_a = degrees(asin(sqrt(mu1**2-mu2**2)/mu0)); # Acceptance angle, degrees
print "The value of acceptance angle is = %4.2f degrees"%theta_a
NA = mu1*sqrt(2*delta); # Numerical aperture of optical fibre
print "The NA of the optical fibre = %4.2f"%NA #incorrect answer in the textbook
```

In [14]:

```
from math import *
#Variable declaration
NA = 0.22; # Numerical aperture of the optical fibre
delta = 0.012; # Fractional difference between the refractive index of core and cladding
#Calculations
mu1 = NA/sqrt(2*delta); # The refractive index of core of optical fibre
print "The refractive index of core = %4.2f"%mu1
mu2 = mu1*(1-delta); # The refractive index of cladding of optical fibre
#Result
print "The refractive index of cladding = %4.2f"%mu2
```

In [17]:

```
from math import *
#Variable declaration
mu1 = 1.466; # Refractive index of core
mu2 = 1.460; # Refractive index of cladding
v = 2.4; # Cut-off parameter of the optical fibre
lamda = 0.8e-006; # Operating wavelength, m
#Calculations&Results
NA = sqrt(mu1**2-mu2**2);
print "The NA of optical fibre = %4.2f"%NA
# Asthe cut-off parameter v of the optical fibre, v = 2*%pi*a*sqrt(mu1^2-mu2^2)/lambda, solving for a
a = lamda*v/(2*pi*sqrt(mu1**2-mu2**2));
print "The core radius of the optical fibre = %4.2f micrometer"%(a/1e-006)
```

In [18]:

```
from math import *
#Variable declaration
mu1 = 1.54; # The refractive index of core
mu2 = 1.50; # The refractive index of cladding
lamda = 1.3e-006; # Operating wavelength of optical fibre, m
a = 25e-006; # Radius of fibre core, m
#Calculations
v = 2*pi*a*sqrt(mu1**2-mu2**2)/lamda; # V-number of optical fibre
print "The cut-off parameter of the optical fibre = %5.2f"%v
n = v**2/2; # The number of modes supported by the fibre
#Result
print "The number of modes supported by the fibre = %3d"%(ceil(n))
```

In [22]:

```
from math import *
#Variable declaration
mu1 = 1.54; # Refractive index of core
v = 2.405; # Cut-off parameter of optical fibre
lamda = 1.3e-006; # Operating wavelength of optical fibre, m
a = 1e-006; # Radius of the core,
#Calculations
NA = v*lamda/(2*pi*a); # Numerical aperture of optical fibre
delta = 1./2*(NA/mu1)**2; # Fractional change in refractive index of core and cladding
print "The fractional difference of refractive indices of core and cladding = %7.5e"%delta
mu2 = mu1*(1-delta); # Maximum value of refractive index of cladding
print "The maximum refractive index of cladding = %5.3f"%mu2
```

In [23]:

```
from math import *
#Variable declaration
mu1 = 1.45; # Index of refraction of core
NA = 0.16; # Numerical aperture of step index fibre
a = 3e-006; # Radius of the core, m
lamda = 0.9e-006; # Operating wavelength of optical fibre, m
#Calculations
v = 2*pi*a*NA/lamda; # The normalized frequency or v-number of optical fibre
#Result
print "The normalized frequency of the optical fibre = %5.2f"%v
```

In [24]:

```
from math import *
#Variable declaration
mu1 = 1.52; # Refractive index of core
a = 14.5e-006; # Radius of the fibre core, m
delta = 0.0007; # Fractional index difference
lamda = 1.3e-006; # Operating wavelength of optical fibre, m
#Calculations&Results
mu2 = mu1*(1-delta); # Refractive index of cladding
v = 2*pi*a*sqrt(mu1**2-mu2**2)/lamda; # Cut-off parameter v of the optical fibre
print "The cut-off parameter of the optical fibre = %5.3f"%v
#The is number of modes supported by the fibre given by,
n = v**2/2;
print "The number of modes supported by the fibre = %d"%(ceil(n))
#Incorrect answer in the textbook for mu2. Hence the difference in answers
```

In [25]:

```
from math import *
#Variable declaration
alpha = 3.5; # Attenuation of the optical fibre, dB/km
Pi = 0.5; # Input power of optical fibre, mW
L = 4; # Distance through the optical wave transmits through the fibre, km
#Calculations
# As alpha = 10/L*log10(Pi/Po), solving for Po
Po = Pi/exp(alpha*L*2.3026/10); # Output power of optical fibre, mW
#Result
print "The output power of optical fibre = %4.1f micro-watt"%(Po/1e-003)
```

In [26]:

```
from math import *
#Variable declaration
Pi =1; # Input power of optical fibre, mW
Po = 0.85; # Outptu power of optical fibre, mW
L = 0.5; #The distance through the optical wave transmits through the fibre, km
#Calculations
alpha = (10/L)*log10(Pi/Po); # The attenuation of power through the optical fibre
#Result
print "The attenuation of power through the optical fibre = %5.3f dB/km"%alpha
```

In [27]:

```
from math import *
#Variable declaration
C = 0.8; # Connector loss per km, dB
F = 1.5; # Fibre loss per km, dB
alpha = C + F; # Attenuation of power the optical fibre, dB/km
Po = 0.3e-006; # Output power of optical fibre, W
L = 15; # The distance through the optical wave transmits through the fibre, km
#Calculations
#As the attenuation, alpha = 10/L*log(Pi/Po), solving for Pi
Pi = Po*exp(2.3026*alpha*L/10); # Input power of optical fibre, mW
#Result
print "The minimum input power to optical fibre = %5.3f mW"%(Pi/1e-003)
```