Chapter 14: Modern Topics

Example 14.1, Page number: 643

In [1]:
 
import scipy
import cmath
from numpy import *

#Variable Declaration

S11=0.85*scipy.e**(-30j*scipy.pi/180)
S12=0.07*scipy.e**(56j*scipy.pi/180)
S21=1.68*scipy.e**(120j*scipy.pi/180)
S22=0.85*scipy.e**(-40j*scipy.pi/180)
Zl=75 
Zo=75

#Calculations

Tl=(Zl-Zo)/(Zl+Zo)
Ti=S11+(S12*S21*Tl)/(1-S22*Tl)                      #reflection coefficient
Timod=abs(Ti)                                       #mod of Ti
Tiang=scipy.arctan(Ti.imag/Ti.real)*180/scipy.pi    #argument of Ti in degrees

#Results

print 'input reflection coefficient =',Timod,'/',Tiang,'degrees'
input reflection coefficient = 0.85 / -30.0 degrees

Example 14.2, Page number: 654

In [2]:
 
import scipy

#Variable Declaration

d=80*(10)**-6       #diameter in m
n1=1.62             #core refractive index
NA=0.21             #numerical aperture
L=8*(10)**-7        #wavelength in m

#Calculations

P=scipy.arcsin(NA)*180/scipy.pi             #acceptance angle
n2=scipy.sqrt(n1**2-NA**2)                  #refractive index
V=(scipy.pi*d/L)*scipy.sqrt(n1**2-n2**2)
N=V**2/2                                    #number of modes

#Results

print 'Acceptance angle =',round(P,2),'degrees'
print 'Refractive index =',round(n2,3)
print 'No. of modes =',round(N,0)
Acceptance angle = 12.12 degrees
Refractive index = 1.606
No. of modes = 2176.0

Example 14.3, Page number: 655

In [3]:
 
import scipy

#Variable Declaration

a=0.25          #in dB/km
P=1-0.4         #strength of pulse im %

#Calculation

l=(10/a)*scipy.log(1/P)/scipy.log(10)   #distance in km

#Result

print 'distance through which the power is reduced by 40% =',round(l,3),'km'
distance through which the power is reduced by 40% = 8.874 km