summaryrefslogtreecommitdiff
path: root/backup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'backup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb')
-rwxr-xr-xbackup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb886
1 files changed, 886 insertions, 0 deletions
diff --git a/backup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb b/backup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb
new file mode 100755
index 00000000..934feb4e
--- /dev/null
+++ b/backup/Optical_Communiation_by_Anasuya_Kalavar_version_backup/chapter2.ipynb
@@ -0,0 +1,886 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:94ac7a20c62e9612d243d85d9b1b3699e50dc46a0975e66ae373ce7747106bc9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2 - Optical Fibers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4.1 page 2-10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import arcsin, sqrt, pi\n",
+ "#Numerical Aperture and critical angle\n",
+ "n1=1.46 #refractive index\n",
+ "d=0.01 #difference\n",
+ "na=n1*sqrt(2*d) #numerical aperture\n",
+ "x=1-d #\n",
+ "oc=arcsin(x)*180/pi #in degree\n",
+ "print \"numerical aperture = \",round(na,2)\n",
+ "print \"critical angle at core cladding interface =\",round(oc,1),\" degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "numerical aperture = 0.21\n",
+ "critical angle at core cladding interface = 81.9 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.1, page 2-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import arcsin, sqrt, pi\n",
+ "#Numerical Aperture ,critical angle and acceptance angle\n",
+ "n2=1.45 #core refrative index\n",
+ "n1=1.49 #cladding refrative index\n",
+ "oc=arcsin(n2/n1)*180/pi #in degree\n",
+ "na=sqrt(n1**2-n2**2) #numerical aperture\n",
+ "pc=arcsin(na)*180/pi #degree\n",
+ "print \"critical angle is =\",round(oc,2),\" degree\"\n",
+ "print \"numerical aperture =\",round(na,3)\n",
+ "print \"acceptance angle is\",round(pc,2),\" degree\"\n",
+ "# Answer in the book are not accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "critical angle is = 76.69 degree\n",
+ "numerical aperture = 0.343\n",
+ "acceptance angle is 20.06 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.2, page 2-11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from numpy import arcsin, sqrt, pi\n",
+ "delta = 1.2/100 # Relative refractive difference index\n",
+ "n1=1.45 # Core refractive index \n",
+ "NA= n1*sqrt(2*delta) #computing numerical aperture\n",
+ "Acceptance_angle = arcsin(NA)*180/pi #computing acceptance angle\n",
+ "si = pi*NA**2 #computing solid acceptance angle\n",
+ "print \"Numerical aperture is %.3f.\\nAcceptance angle is %.2f degree.\\nSolid acceptance angle is %.3f radians.\" %(NA,Acceptance_angle,si) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture is 0.225.\n",
+ "Acceptance angle is 12.98 degree.\n",
+ "Solid acceptance angle is 0.159 radians.\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.3, page 2-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "NA = 0.45 # Numerical Aperture\n",
+ "Acceptance_angle = arcsin(NA)*180/pi #computing acceptance angle.\n",
+ "print \"Acceptance angle is %.1f degree.\" %Acceptance_angle"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptance angle is 26.7 degree.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.4, page 2-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import arctan\n",
+ "diameter = 1 #Diameter in centimeter\n",
+ "Focal_length = 10 #Focal length in centimeter\n",
+ "radius=diameter/2 #computing radius\n",
+ "Acceptance_angle = arctan(radius/Focal_length)*180/pi #computing acceptance angle\n",
+ "Conical_full_angle = 2*Acceptance_angle #computing conical angle\n",
+ "Solid_acceptance_angle = pi*Acceptance_angle**2 #computing solid acceptance angle\n",
+ "NA = sqrt(Solid_acceptance_angle/pi) #computing Numerical aperture\n",
+ "print \"Numerical aperture is %.2f.\\nConical full angle is %.2f degree.\" %(NA,Conical_full_angle) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture is 2.86.\n",
+ "Conical full angle is 5.72 degree.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6.1, page 2-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import cos\n",
+ "NA = 0.45 #Numerical aperture\n",
+ "betaB = 45 # Skew ray change direction by 90 degree at each reflection\n",
+ "Meridional_theta = arcsin(NA)*180/pi #computing acceptacne angle for meridoinal ray\n",
+ "Skew_theta = arcsin(NA/cos(betaB*pi/180))*180/pi #computing acceptacne angle for skew ray\n",
+ "print \"Acceptacne angle for Meridoinal ray is %.2f degree.\\nAcceptance angle for Skew ray %.1f degree.\" %(Meridional_theta,Skew_theta) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Acceptacne angle for Meridoinal ray is 26.74 degree.\n",
+ "Acceptance angle for Skew ray 39.5 degree.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.1, page 2-21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "core_diameter=78*10**-6 #core diameter\n",
+ "delta=1.4/100 #relative index difference\n",
+ "lamda=0.8*10**-6 #operating wavelength\n",
+ "n1=1.47 #core refractive index\n",
+ "a=core_diameter/2 #computing core radius\n",
+ "v= 2*3.14*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n",
+ "M=(v)**2/2 #computing guided modes\n",
+ "print \"Normalized Frequency is %.3f.\\nTotal number of guided modes are %.1f\" %(v,M)\n",
+ "#answer in the book are incorrect."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 75.306.\n",
+ "Total number of guided modes are 2835.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.2, page 2-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n1=1.47 #refractive index of core\n",
+ "a=4.3*10**-6 #radius of core\n",
+ "delta=0.2/100 #relative index difference\n",
+ "lamda= 2*3.14*a*n1*sqrt(2*delta)/2.405 #computing wavelength\n",
+ "lamda=lamda*10**9 \n",
+ "print \"Wavelength of fiber is %d nm.\" %lamda\n",
+ "#answer in the book is given as 1230nm which is incorrect."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of fiber is 1043 nm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.3, page 2-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n1=1.482 #refractive index of core\n",
+ "n2=1.474 #refractive index of cladding\n",
+ "lamda=820*10**-9 #Wavelength\n",
+ "NA=sqrt(n1**2 - n2**2) #computing Numerical aperture\n",
+ "theta= arcsin(NA)*180/pi #computing acceptance angle\n",
+ "solid_angle=pi*(NA)**2 #computing solid angle\n",
+ "a=2.405*lamda/(2*3.14*NA) #computing core radius\n",
+ "a=a*10**6 \n",
+ "print \"Numerical aperture is %.3f.\\nAcceptance angle is %.1f degrees.\\nSolid angle is %.3f radians.\\nCore radius is %.2f micrometer.\" %(NA,theta,solid_angle,a) \n",
+ "#answer in the book are not accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Numerical aperture is 0.154.\n",
+ "Acceptance angle is 8.8 degrees.\n",
+ "Solid angle is 0.074 radians.\n",
+ "Core radius is 2.04 micrometer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.4, page 2-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import ceil\n",
+ "NA=0.16 #Numerical aperture\n",
+ "n1=1.45 #core refractive index\n",
+ "d=60*10**-6 #core diameter\n",
+ "lamda=0.82*10**-6 #wavelength\n",
+ "a=d/2 #core radius\n",
+ "v=2*3.14*a*NA/lamda #computing normalized frequency\n",
+ "M=v**2/2 #computing guided modes\n",
+ "print \"if normalized frequency is taken as %d, then there are %d guided modes.\" %(ceil(v),M) \n",
+ "#Answer given in the textbook is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "if normalized frequency is taken as 37, then there are 675 guided modes.\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.5, page 2-26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "NA=0.2 #Numericla aperture\n",
+ "d=50*10**-6 #Diameter of core\n",
+ "lamda=1*10**-6 #Wavelength\n",
+ "a=d/2 #computing radius\n",
+ "v=2*3.14*a*NA/lamda #computing normalized frequency\n",
+ "Mg=v**2/4 #computing mode volume for parabollic profile\n",
+ "Mg=round(Mg) \n",
+ "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,Mg) \n",
+ "#answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 31.4.\n",
+ "Total number of guided modes are 246.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.6, page 2-27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "delta=0.015 #relative refractive index\n",
+ "n1=1.48 #core refractive index\n",
+ "lamda=0.85*10**-6 #wavelength\n",
+ "a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)) #computing radius of core\n",
+ "d=2*a #computing diameter of core\n",
+ "a=a*10**7 \n",
+ "a=round(a,2) \n",
+ "a=a/10\n",
+ "d=d*10**6 \n",
+ "print \"Core radius is %.1f micrometer.\\nCore diameter is %.1f micrometer.\" %(a,2*a) \n",
+ "print \"When delta is reduced by 10 percent-\"\n",
+ "delta=0.0015 \n",
+ "a=(2.4*lamda)/(2*3.14*n1*sqrt(2*delta)) #computing radius of core\n",
+ "d=2*a #computing diameter of core\n",
+ "a=a*10**7 \n",
+ "a=round(a) \n",
+ "a=a/10\n",
+ "d=d*10**6 \n",
+ "print \"Core radius is %.1f micrometer.\\nCore diameter is %.1f micrometer.\" %(a,2*a) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Core radius is 1.3 micrometer.\n",
+ "Core diameter is 2.5 micrometer.\n",
+ "When delta is reduced by 10 percent-\n",
+ "Core radius is 4.0 micrometer.\n",
+ "Core diameter is 8.0 micrometer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.7, page 2-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "NA=0.25 #Numericla aperture\n",
+ "d=45*10**-6 #Diameter of core\n",
+ "lamda=1.5*10**-6 #Wavelength\n",
+ "a=d/2 #computing radius\n",
+ "v=2*3.14*a*NA/lamda #computing normalized frequency\n",
+ "Mg=v**2/4 #computing mode volume for parabollic profile\n",
+ "Mg=round(Mg,2) \n",
+ "print \"Normalized Frequency is %.2f.\\nTotal number of guided modes are %.d.\" %(v,ceil(Mg) )\n",
+ "#answer in the book for normalized frequency is 23.55, deviation 0.05"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 23.55.\n",
+ "Total number of guided modes are 139.\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.8, page 2-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "NA=0.25 #Numericla aperture\n",
+ "d=45*10**-6 #Diameter of core\n",
+ "lamda=1.2*10**-6 #Wavelength\n",
+ "a=d/2 #computing radius\n",
+ "v=2*3.14*a*NA/lamda #computing normalized frequency\n",
+ "Mg=v**2/4 #computing mode volume for parabollic profile\n",
+ "Mg=round(Mg,2) \n",
+ "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,Mg) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 29.4.\n",
+ "Total number of guided modes are 216.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.9, page 2-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n1=1.54 #refractive index of core\n",
+ "n2=1.5 #refractive index of cladding\n",
+ "a=25*10**-6 #Radius of core in um\n",
+ "lamda=1.3*10**-6 #Wavelength in m\n",
+ "NA=sqrt(n1**2-n2**2) \n",
+ "v=2*3.14*a*NA/lamda #computing normalized frequency\n",
+ "Mg=v**2/4 #computing mode volume for parabollic profile\n",
+ "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n",
+ "lamda_cut_off=lamda_cut_off*10**6 \n",
+ "print \"Normalized Frequency is %0.f.\\nTotal number of guided modes are %.d.\\nCut off wavelength is %.1f micrometer.\" %(v,Mg,lamda_cut_off) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 42.\n",
+ "Total number of guided modes are 443.\n",
+ "Cut off wavelength is 22.8 micrometer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.1 page 2-30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L_BL=8*10**-2 #beat length\n",
+ "Br=2*3.14/L_BL #computing modal briefringence\n",
+ "print \"Modal briefringence is %.1f per meter.\" %Br"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modal briefringence is 78.5 per meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.2, page 2-33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import log10\n",
+ "Pin=500*10**-6 #input power\n",
+ "L=200 #length of fiber\n",
+ "loss=2 #loss associated with fiber\n",
+ "Pin_dbm=10*log10(Pin/(10**-3)) #computing input power in dBm\n",
+ "Pin_dbm=round(Pin_dbm) \n",
+ "Pout_dbm=Pin_dbm-L*loss #computing output power level\n",
+ "Pout= 10**(Pout_dbm/10) \n",
+ "print \"Output power is %.2e mW.\" %Pout"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output power is 5.01e-41 mW.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12.1, page 2-37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "a=4.5*10**-6 #core diameter\n",
+ "delta=0.25/100 #relative index difference\n",
+ "lamda=0.85*10**-6 #operating wavelength\n",
+ "n1=1.46 #core refractive index\n",
+ "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n",
+ "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n",
+ "lamda_cut_off=lamda_cut_off*10**9 \n",
+ "print \"Cut off wavelength is %.d nanometer.\" %(lamda_cut_off)\n",
+ "print \"When delta is 1.25 percent-\" \n",
+ "delta=1.25/100 \n",
+ "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n",
+ "lamda_cut_off=v*lamda/2.405 #computing cut off wavelength\n",
+ "lamda_cut_off=lamda_cut_off*10**7 \n",
+ "lamda_cut_off=round(lamda_cut_off) \n",
+ "lamda_cut_off=lamda_cut_off*100 \n",
+ "print \"Cut off wavelength is %.d nanometer.\" %(lamda_cut_off) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cut off wavelength is 1213 nanometer.\n",
+ "When delta is 1.25 percent-\n",
+ "Cut off wavelength is 2700 nanometer.\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12.2, page 2-38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "a=50*10**-6 #core radius\n",
+ "lamda=1500*10**-9 #operating wavelength\n",
+ "n1=2.53 #core refractive index\n",
+ "n2=1.5 #cladding refractive index\n",
+ "delta=(n1-n2)/n1 #computing delta\n",
+ "v= 2*3.14*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n",
+ "M=(v)**2/2 #computing guided modes\n",
+ "print \"Normalized Frequency is %.1f\\nTotal number of guided modes are %.d\" %(v,M) \n",
+ "\n",
+ "#Calculation error in book. Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 477.9\n",
+ "Total number of guided modes are 114191\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12.3, page 2-38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "core_diameter=8*10**-6 #core diameter\n",
+ "delta=0.92/100 #relative index difference\n",
+ "lamda=1550*10**-9 #operating wavelength\n",
+ "n1=1.45 #core refractive index\n",
+ "a=core_diameter/2 #computing core radius\n",
+ "v= 2*pi*a*n1*sqrt(2*delta)/lamda #computing normalized frequency\n",
+ "M=(v)**2/2 #computing guided modes\n",
+ "print \"Normalized Frequency is %.1f.\\nTotal number of guided modes are %.d.\" %(v,M) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Normalized Frequency is 3.2.\n",
+ "Total number of guided modes are 5.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12.4, page 2-39 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "delta=1/100 #relative index difference\n",
+ "n1=1.5 #core refractive index\n",
+ "c=3*10**8 \n",
+ "L=6 \n",
+ "n2=sqrt(n1**2-2*delta*n1**2) #computing refractive index of cladding\n",
+ "delta_T=L*n1**2*delta/(c*n2) #computing pulse broadning\n",
+ "delta_T=delta_T*10**11 \n",
+ "delta_T=round(delta_T) \n",
+ "print \"Delay difference between slowest and fastest mode is %d ns/km.\" %delta_T \n",
+ "print \"This means that a pulse broadnes by %d ns after travel time a distance of %d km.\" %(delta_T,L)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Delay difference between slowest and fastest mode is 30 ns/km.\n",
+ "This means that a pulse broadnes by 30 ns after travel time a distance of 6 km.\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17.1, page 2-60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n1=1.48 #core refractive index\n",
+ "n2=1.46 #cladding refractive index\n",
+ "phi = arcsin(n2/n1)*180/pi #computing critical angle\n",
+ "NA = sqrt(n1**2 - n2**2) #computing numericla aperture\n",
+ "theta= arcsin(NA)*180/pi #computing acceptance angle\n",
+ "print \"Critical angle is %.2f degrees.\\nNumerical aperture is %.3f.\\nAcceptance angle is %.2f degree.\" %(phi,NA,theta) \n",
+ "#answers in the book are wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical angle is 80.57 degrees.\n",
+ "Numerical aperture is 0.242.\n",
+ "Acceptance angle is 14.03 degree.\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Question 4, page 2-61 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L_BL=8*10**-2 #beat length\n",
+ "Br=2*3.14/L_BL #computing modal briefringence\n",
+ "print \"Modal briefringence is %.1f per meter.\" %Br "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Modal briefringence is 78.5 per meter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Question 5, page 2-62 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L_BL=0.6*10**-3 #beat length\n",
+ "lamda=1.4*10**-6 #wavelength\n",
+ "L_BL1=70 \n",
+ "Bh=lamda/L_BL #computing high briefringence\n",
+ "Bl=lamda/L_BL1 #computing low briefringence\n",
+ "print \"High briefringence is %.2e.\\nLow briefringence is %.1e.\"%(Bh,Bl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "High briefringence is 2.33e-03.\n",
+ "Low briefringence is 2.0e-08.\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file