{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 11: Fibre Optics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 1, Page number 11-16" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.2965\n", "acceptance angle is 17 degrees 15 minutes\n", "answer in the book varies due to rounding off errors\n", "critical angle is 78 degrees 26 minutes\n", "fractional index change is 0.02\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.48; #Core refractive index\n", "n2=1.45; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "theta0=math.asin(NA); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "thetac=math.asin(n2/n1); #critical angle(radian)\n", "thetac=thetac*180/math.pi; #critical angle(degrees)\n", "thetacm=60*(thetac-int(thetac)); #critical angle(minutes)\n", "delta=(n1-n2)/n1; #fractional index change\n", "\n", "#Result\n", "print \"numerical aperture is\",round(NA,4)\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(round(theta0m)),\"minutes\"\n", "print \"critical angle is\",int(thetac),\"degrees\",int(thetacm),\"minutes\"\n", "print \"fractional index change is\",round(delta,2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 2, Page number 11-17" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.446\n", "acceptance angle is 26 degrees 29 minutes\n", "answer for angle in minutes given in the book varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.563; #Core refractive index\n", "n2=1.498; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "theta0=math.asin(NA); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "\n", "#Resul\"\n", "print \"numerical aperture is\",round(NA,3)\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(theta0m),\"minutes\"\n", "print \"answer for angle in minutes given in the book varies due to rounding off errors\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 3, Page number 11-17" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "fractional index change is 0.0416\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.563; #Core refractive index\n", "n2=1.498; #Cladding refractive index\n", "\n", "#Calculation\n", "delta=(n1-n2)/n1; #fractional index change\n", "\n", "#Result\n", "print \"fractional index change is\",round(delta,4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 4, Page number 11-17" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.3905\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.55; #Core refractive index\n", "n2=1.50; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "\n", "#Result\n", "print \"numerical aperture is\",round(NA,4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 5, Page number 11-18" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Cladding refractive index is 1.496\n", "Core refractive index is 1.546\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "NA=0.39; #numerical aperture\n", "n1_n2=0.05; #difference in refractive indices\n", "\n", "#Calculation\n", "n1n2=NA**2/n1_n2; \n", "n2=(n1n2-n1_n2)/2; #Cladding refractive index\n", "n1=n2+n1_n2; #Core refractive index\n", "\n", "#Result\n", "print \"Cladding refractive index is\",n2\n", "print \"Core refractive index is\",n1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 6, Page number 11-18" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.3905\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.55; #Core refractive index\n", "n2=1.50; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "\n", "#Result\n", "print \"numerical aperture is\",round(NA,4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 7, Page number 11-18" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.2965\n", "acceptance angle is 17 degrees 15 minutes\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.48; #Core refractive index\n", "n2=1.45; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "theta0=math.asin(NA); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "\n", "#Result\n", "print \"numerical aperture is\",round(NA,4)\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(round(theta0m)),\"minutes\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 8, Page number 11-19" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "refractive index of core is 1.6583\n", "refractive index of cladding is 1.625\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "NA=0.33; #numerical aperture\n", "delta=0.02; #refractive index of cladding\n", "\n", "#Calculation\n", "x=1-delta;\n", "n1=math.sqrt(NA**2/(1-x**2)); #refractive index of core \n", "n2=x*n1; #refractive index of cladding\n", "\n", "#Result\n", "print \"refractive index of core is\",round(n1,4)\n", "print \"refractive index of cladding is\",round(n2,3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 9, Page number 11-19" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "acceptance angle is 8 degrees 38 minutes 55 seconds\n", "answer for angle in seconds given in the book varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "NA=0.20; #numerical aperture\n", "n0=1.33; #refractive index of water\n", "n2=1.59; #Cladding refractive index\n", "\n", "#Calculation\n", "n1=math.sqrt((NA**2)+(n2**2)); #core refractive index\n", "x=math.sqrt((n1**2)-(n2**2))/n0;\n", "theta0=math.asin(x); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "theta0s=60*(theta0m-int(theta0m)); #acceptance angle(seconds)\n", "\n", "#Resul\"\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(theta0m),\"minutes\",int(theta0s),\"seconds\"\n", "print \"answer for angle in seconds given in the book varies due to rounding off errors\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 10, Page number 11-20" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "fractional index change is 6.8966 *10**-3\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.45; #Core refractive index\n", "n2=1.44; #Cladding refractive index\n", "\n", "#Calculation\n", "delta=(n1-n2)/n1; #fractional index change\n", "\n", "#Result\n", "print \"fractional index change is\",round(delta*10**3,4),\"*10**-3\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 11, Page number 11-20" ] }, { "cell_type": "code", "execution_count": 41, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Cladding refractive index is 1.44\n", "numerical aperture is 0.42\n", "acceptance angle is 24 degrees 50 minutes\n", "critical angle is 73 degrees 44 minutes\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.50; #Core refractive index\n", "delta=4/100; #fractional index change\n", "\n", "#Calculation\n", "n2=n1-(delta*n1); #Cladding refractive index\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "theta0=math.asin(NA); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "thetac=math.asin(n2/n1); #critical angle(radian)\n", "thetac=thetac*180/math.pi; #critical angle(degrees)\n", "thetacm=60*(thetac-int(thetac)); #critical angle(minutes)\n", "\n", "#Result\n", "print \"Cladding refractive index is\",n2\n", "print \"numerical aperture is\",NA\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(round(theta0m)),\"minutes\"\n", "print \"critical angle is\",int(thetac),\"degrees\",int(thetacm),\"minutes\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 12, Page number 11-21" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "numerical aperture is 0.446\n", "acceptance angle is 26 degrees 29 minutes\n", "answer for angle in minutes given in the book varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n1=1.563; #Core refractive index\n", "n2=1.498; #Cladding refractive index\n", "\n", "#Calculation\n", "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", "theta0=math.asin(NA); #acceptance angle(radian)\n", "theta0=theta0*180/math.pi; #acceptance angle(degrees)\n", "theta0m=60*(theta0-int(theta0)); #acceptance angle(minutes)\n", "\n", "#Result\n", "print \"numerical aperture is\",round(NA,3)\n", "print \"acceptance angle is\",int(theta0),\"degrees\",int(round(theta0m)),\"minutes\"\n", "print \"answer for angle in minutes given in the book varies due to rounding off errors\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }