{
 "metadata": {
  "celltoolbar": "Raw Cell Format",
  "name": "",
  "signature": "sha256:1e4d0cb1e6af5f2ee5a73d38df1e61042145299577d4ca71b8e33e3c54289d1b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5: Optical Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1,Page number 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given\n",
      "\n",
      "Vrms=0.3;       #in V\n",
      "CF=0.75;        #in V/mW\n",
      "Pi=Vrms/CF;         \n",
      "print\" input power \",round(Pi,4),\"mW\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " input power  0.4 mW\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2,Page number 131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#given\n",
      "\n",
      "Di=155;         #in Mb/s\n",
      "sl=10**-3*Di*10**6;           #in  bitstream\n",
      "#PRBS=2**x-1=sl;\n",
      "x=log(sl+1)/log(2);           #equation is made to pick value of x\n",
      "print\" PRBS =(2^\",int(x),\")-1\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " PRBS =(2^ 17 )-1\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}