summaryrefslogtreecommitdiff
path: root/Fiber_Optics_Communication_by_H._Kolimbiris/chapter5_1.ipynb
blob: dccdb2b0220f88badb509e15d4badfb82a98a4e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
 "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": {}
  }
 ]
}