{

 "metadata": {

  "name": "",

  "signature": "sha256:ac520a54154462ad172aef8bbb865642cb1f987c781ea69ea1084ba6e27e7f6b"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter06: Advanced Optical Systems"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.5.1:Pg-6.11"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "import math\n",

      "lamda_p= 980*10**-9 \n",

      "lamda_s=1550*10**-9 \n",

      "P_in=30      #  in mW....\n",

      "G=100 \n",

      "\n",

      "Ps_max= ((lamda_p*P_in)/lamda_s)/(G-1) \n",

      "print \" \\nMaximum input power in mW = \",round(Ps_max,5) \n",

      " \n",

      "Ps_out= Ps_max + (lamda_p*P_in/lamda_s) \n",

      "Ps_out= 10*math.log10(Ps_out) \n",

      "print \" \\n\\nOutput power in dBm = \",round(Ps_out,2)\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " \n",

        "Maximum input power in mW =  0.19159\n",

        " \n",

        "\n",

        "Output power in dBm =  12.82\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.5.2:Pg-6.12"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given\n",

      "import math\n",

      "Ps_out= 30.0           # in uW...\n",

      "Ps_in=1.0 \n",

      "Noise_power = 0.5 \n",

      "\n",

      "G= Ps_out/Ps_in \n",

      "\n",

      "G= 10*math.log10(G) \n",

      "print \" \\nThe Gain EDFA in dB = \",round(G,2) \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " \n",

        "The Gain EDFA in dB =  14.77\n"

       ]

      }

     ],

     "prompt_number": 15

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.10.1:Pg-6.22"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "import math\n",

      "P0=200.0 \n",

      "P1=90.0 \n",

      "P2=85.0 \n",

      "P3=6.3 \n",

      " # All powers in uW...\n",

      "coupling_ratio= P2/(P1+P2)*100 \n",

      "print \" \\n\\n Coupling Ratio in % = \",round(coupling_ratio,2) \n",

      "excess_ratio= 10*math.log10(P0/(P1+P2))\n",

      "print \" \\n\\n The Excess Ratio in % = \",round(excess_ratio,4) \n",

      "insertion_loss=10*math.log10(P0/P1) \n",

      "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n",

      "insertion_loss1=10*math.log10(P0/P2) \n",

      "print \" \\n\\n The Insertion Loss (from Port 0 to Port 2) in dB= \",round(insertion_loss1,2) \n",

      "cross_talk=10*math.log10(P3/P0) \n",

      "print \" \\n\\n The Cross Talk in dB= \",int(cross_talk)  \n",

      "print \" \\n\\n***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\" \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " \n",

        "\n",

        " Coupling Ratio in % =  48.57\n",

        " \n",

        "\n",

        " The Excess Ratio in % =  0.5799\n",

        " \n",

        "\n",

        " The Insertion Loss (from Port 0 to Port 1) in dB=  3.47\n",

        " \n",

        "\n",

        " The Insertion Loss (from Port 0 to Port 2) in dB=  3.72\n",

        " \n",

        "\n",

        " The Cross Talk in dB=  -15\n",

        " \n",

        "\n",

        "***NOTE: Cross Talk calculated wrognly in book... Value of P3 wrognly taken\n"

       ]

      }

     ],

     "prompt_number": 34

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.10.2:Pg-6.23"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "import math\n",

      "P0= 300.0 \n",

      "P1=150.0 \n",

      "P2=65.0 \n",

      "P3=8.3*10**-3 \n",

      " # All powers in uW...\n",

      "splitting_ratio= P2/(P1+P2)*100 \n",

      "print \" \\n\\n Splitting Ratio in %= \",round(splitting_ratio,2) \n",

      "excess_ratio= 10*math.log10(P0/(P1+P2))\n",

      "print \" \\n\\n The Excess Ratio in dB= \",round(excess_ratio,4)\n",

      "insertion_loss=10*math.log10(P0/P1) \n",

      "print \" \\n\\n The Insertion Loss (from Port 0 to Port 1) in dB= \",round(insertion_loss,2) \n",

      "cross_talk=10*math.log10(P3/P0) \n",

      "print \" \\n\\n The Cross Talk in dB= \",round(cross_talk,2) \n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " \n",

        "\n",

        " Splitting Ratio in %=  30.23\n",

        " \n",

        "\n",

        " The Excess Ratio in dB=  1.4468\n",

        " \n",

        "\n",

        " The Insertion Loss (from Port 0 to Port 1) in dB=  3.01\n",

        " \n",

        "\n",

        " The Cross Talk in dB=  -45.58\n"

       ]

      }

     ],

     "prompt_number": 19

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.10.3:Pg-6.25"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "import math\n",

      "N=32.0 \n",

      "Ft=(100-5)/100.0 \n",

      "Total_loss= 10*(1-3.322*math.log10(Ft))*math.log10(N) \n",

      "print \" The total loss in the coupler in dB = \",round(Total_loss,2) \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " The total loss in the coupler in dB =  16.17\n"

       ]

      }

     ],

     "prompt_number": 27

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.10.4:Pg-6.28"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "N=10 \n",

      "L=0.5 \n",

      "alpha=0.4 \n",

      "Lthru=0.9 \n",

      "Lc=1 \n",

      "Ltap=10 \n",

      "Li=0.5 \n",

      "Total_loss= N*(alpha*L +2*Lc +Lthru+Li)-(alpha*L)-(2*Lthru)+(2*Ltap) \n",

      "print \" The total loss in the coupler in dB = \",int(Total_loss)\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " The total loss in the coupler in dB =  54\n"

       ]

      }

     ],

     "prompt_number": 30

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex6.11.1:Pg-6.33"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "#Given\n",

      "del_v=10*10**9 \n",

      "N_eff= 1.5 \n",

      "c=3*10**11   #  speed of light in mm/sec\n",

      "del_L= c/(2*N_eff*del_v) \n",

      "print \" The wave guide length differenc in mm= \",int(del_L) \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        " The wave guide length differenc in mm=  10\n"

       ]

      }

     ],

     "prompt_number": 33

    }

   ],

   "metadata": {}

  }

 ]

}