Chapter 5: Optical Amplifiers

Example 5.1,Page number 128

In [5]:
import math

#given

Vrms=0.3;       #in V
CF=0.75;        #in V/mW
Pi=Vrms/CF;         
print" input power ",round(Pi,4),"mW";
 input power  0.4 mW

Example 5.2,Page number 131

In [9]:
import math

#given

Di=155;         #in Mb/s
sl=10**-3*Di*10**6;           #in  bitstream
#PRBS=2**x-1=sl;
x=log(sl+1)/log(2);           #equation is made to pick value of x
print" PRBS =(2^",int(x),")-1";
 PRBS =(2^ 17 )-1