summaryrefslogtreecommitdiff
path: root/Modern_Physics_By_G.Aruldas/Chapter16.ipynb
blob: 932f48025f844409bbfc00e522bf7acacc259dc5 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
 "metadata": {
  "name": "",
  "signature": "sha256:8689775b6694dc6c6ea95bc809bbd7280d9553003ec1dbe78844db2dc6fa68f3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "16: Fibre optics and holography"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.1, Page number 306"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "n2=1.4;    #refractive index of cladding\n",
      "n1=1.43;   #refractive index of core\n",
      "\n",
      "#Calculation\n",
      "costhetac=n2/n1;  \n",
      "thetac=math.acos(costhetac);     #propagation angle(radian)\n",
      "thetac=thetac*180/math.pi;    #propagation angle(degrees)\n",
      "NA=math.sqrt(n1**2-n2**2);   #numerical aperture\n",
      "thetaa=math.asin(NA);    #angle(radian)\n",
      "thetaa=thetaa*180/math.pi;    #angle(degrees)\n",
      "thetaa=2*thetaa;    #acceptance angle(degrees)\n",
      "\n",
      "#Result\n",
      "print \"propagation angle is\",round(thetac,1),\"degrees\"\n",
      "print \"numerical aperture is\",round(NA,4)\n",
      "print \"acceptance angle is\",round(thetaa,2),\"degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "propagation angle is 11.8 degrees\n",
        "numerical aperture is 0.2914\n",
        "acceptance angle is 33.88 degrees\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.3, Page number 311"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "z=30;    #length of optical fibre(km)\n",
      "alpha=0.8;    #fibre loss(dB/km)\n",
      "Pi=200;   #input power(micro W)\n",
      "\n",
      "#Calculation\n",
      "a=alpha*z/10;\n",
      "b=10**a;\n",
      "P0=Pi/b;    #output power(micro W)\n",
      "\n",
      "#Result\n",
      "print \"output power is\",round(P0,3),\"micro W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "output power is 0.796 micro W\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}