# Example no.4.2
# To calculate the voltage required to introduce a phase shift of pi/2.
# Page no.152
import math
# Given data
lambda0=1530*10**-9; # An electro-optic modulator operating wavelength
d=10*10**-6; # Thickness
L=5*10**-2; # Length
n0=2.2; # Refractive index
r33=30*10**-12; # Pockel coefficient in m/V
deltaphi=math.pi/2; # Phase shift
V=(deltaphi*lambda0*d)/(math.pi*L*n0**3*r33); # The voltage required to introduce a phase shift of pi/2
#Displaying the result in command window
print "\n The voltage required to introduce a phase shift of pi/2 = ",round(V,2)," V"