{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18 Fibre Optics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.1 Page no 859"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "c=3*10**8          #velocity of light\n",
      "f=4.4*10**14       #frequency of red light\n",
      "f1=7.0*10**14     #frequency of violet light\n",
      "\n",
      "#calculation\n",
      "h1=c/f             #wavelength of red light\n",
      "h2=c/f1            #wavelength of violet light\n",
      "\n",
      "#result\n",
      "print\"wavelenght for red= \",round(h1,9),\"m\"\n",
      "print\"wavelngth for violet= \",round(h2,8),\"micron\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelenght for red=  6.82e-07 m\n",
        "wavelngth for violet=  4.3e-07 micron\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2 Page no 862"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "n1=1.535             #refractive index of fibre optics\n",
      "n2=1.490             #refractive index of cladding\n",
      "\n",
      "#calculation\n",
      "import math\n",
      "x=(n1**2)-(n2**2)\n",
      "y=math.sqrt(x)     #numerical aperture\n",
      "z=math.asin(y)*180/3.14      #theta\n",
      "\n",
      "#result\n",
      "print\"NA = \",round(y,3)\n",
      "print\"(theta)in(max) = \",round(z,1),\"degree\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "NA =  0.369\n",
        "(theta)in(max) =  21.7 degree\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3 Page no 868"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "w=22                  #spectral width of LED\n",
      "l=2                   #length of fibre\n",
      "d=95                  #dispersion value\n",
      "p=d*w                 #pulse dispersion\n",
      "pt=p*l                #total pulse dispersion\n",
      "\n",
      "#result\n",
      "print\"pulse dispersion = \",p,\"ps/km\"\n",
      "print\"total pulse dispersion = \",pt,\"ps/km\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "pulse dispersion =  2090 ps/km\n",
        "total pulse dispersion =  4180 ps/km\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.4 Page no 885"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "d=30                 #length of fibre cable\n",
      "l=0.4                #loss\n",
      "\n",
      "#calculation\n",
      "T=d*l                #total cable loss\n",
      "\n",
      "#result\n",
      "print\"total cable loss = \",T,\"dB\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "total cable loss =  12.0 dB\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.5 Page no 887"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given\n",
      "b=565                      #Line bit rate of fibre 1\n",
      "c=3.5                      #Cable dispersion of fibre 1\n",
      "t=4                        #Transmitter spectral width of fibre 1\n",
      "b1=1130                    #Line bit rate of fibre 2\n",
      "c1=3.5                     #Cable dispersion of fibre 2\n",
      "t1=2                       #Transmitter spectral width of fibre 2\n",
      "x=440000                   #assumed gaussian constant \n",
      "\n",
      "#calculation\n",
      "L1=x/(b*c*t)               #span length in km of fibre 1\n",
      "L2=x/(b1*c1*t1)            #span length in km of fibre 2\n",
      "\n",
      "#result \n",
      "print\"span lenght of fibre 1= \",round(L1,2),\"Km\"\n",
      "print\"span lenght of fibre 2= \",round(L2,2),\"Km\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "span lenght of fibre 1=  55.63 Km\n",
        "span lenght of fibre 2=  55.63 Km\n"
       ]
      }
     ],
     "prompt_number": 20
    }
   ],
   "metadata": {}
  }
 ]
}