chapter10 - Performance measurement and monitoring

Example 10.5.1, page 10-24

In [1]:
from numpy import sqrt
from __future__ import division
To=12.6     #width of output pulse
Ti=0.3      #width of input pulse
l=1.2       #length of measurement
Pulse_dispersion = sqrt(To**2 - Ti**2)    #computing pulse dispersion
PDKM=Pulse_dispersion/l         #computing pulse dispersion per Kilometer
BW=0.44/PDKM        #computing optical bandwidth
BW=BW*1000 
print "Pulse broadning is %.1f ns/km.\nOptical bandwidth is %.1f MHz.Km." %(PDKM,BW) 
Pulse broadning is 10.5 ns/km.
Optical bandwidth is 41.9 MHz.Km.

Example 10.6.1, page 10-28

In [2]:
from numpy import log10
V2=12 
V1=2.5 
L2=3 
L1=0.004 
alpha_dB = 10* log10(V2/V1)/(L2-L1) 
un = 0.2/(L2-L1) 
print "Attenuation is %.2f dB/km\nUncertainity +/- %.3f dB." %(alpha_dB,un) 
#answer for attenuation in the book is wrong.
Attenuation is 2.27 dB/km
Uncertainity +/- 0.067 dB.