summaryrefslogtreecommitdiff
path: root/Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-03-06 23:30:10 +0600
committerTrupti Kini2016-03-06 23:30:10 +0600
commitf78ea80ea8da9f42637ce019f233895e0638b230 (patch)
tree3ef9791b558642676567bf2b4dc94f9b38a57c31 /Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb
parent22e17d795629cfe00e03435f879cfd07f27e096a (diff)
downloadPython-Textbook-Companions-f78ea80ea8da9f42637ce019f233895e0638b230.tar.gz
Python-Textbook-Companions-f78ea80ea8da9f42637ce019f233895e0638b230.tar.bz2
Python-Textbook-Companions-f78ea80ea8da9f42637ce019f233895e0638b230.zip
Added(A)/Deleted(D) following books
A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter10.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter11.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter12.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter13.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter14.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter2.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter3.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter4.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter5.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter7.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter8.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter9.ipynb A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/screenshots/1.png A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/screenshots/2.png A Fiber_Optics_and_Optoelectronics_by_R._P._Khare/screenshots/3.png A sample_notebooks/LalitKumar/Ch3.ipynb
Diffstat (limited to 'Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb')
-rw-r--r--Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb246
1 files changed, 246 insertions, 0 deletions
diff --git a/Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb b/Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb
new file mode 100644
index 00000000..042791db
--- /dev/null
+++ b/Fiber_Optics_and_Optoelectronics_by_R._P._Khare/Chapter6.ipynb
@@ -0,0 +1,246 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter6 - Optical fiber cables and connections"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1 : Page 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "refractive index = 1.59\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "#refractive index\n",
+ "l=0.47##in db\n",
+ "nf=10**((l/-10))##\n",
+ "from sympy import symbols, solve\n",
+ "x=symbols(\"x\")\n",
+ "p=1+-2.22*x+x**2##\n",
+ "y=solve(p,x)##\n",
+ "print \"refractive index = %0.2F\"%y[1]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2 : Page 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "part (a)\n",
+ "insertion loss at the joint = 0.64 dB\n",
+ "part (b)\n",
+ "insertion loss at the joint = 0.286 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log10, acos, pi\n",
+ "#loss\n",
+ "print \"part (a)\"\n",
+ "dya=0.1##\n",
+ "n1=1.50##refrative index\n",
+ "na=1##\n",
+ "k1=n1/n1##\n",
+ "k2=1##\n",
+ "nf=((16*(n1)**2)/((n1+1)**4))##\n",
+ "nlat=(2/(3.14))*(acos(dya/2)-(dya/2)*(1-(dya/2)**2)**(1/2))##\n",
+ "nt=nf*nlat##\n",
+ "lt=(-10*log10(nt))##in dB\n",
+ "print \"insertion loss at the joint = %0.2f dB\"%lt\n",
+ "print \"part (b)\"\n",
+ "dya=0.1##\n",
+ "n1=1.50##refrative index\n",
+ "na=1##\n",
+ "k1=n1/n1##\n",
+ "k2=1##\n",
+ "nf=((16*(n1)**2)/((n1+1)**4))##\n",
+ "nlat=(2/(pi))*(acos(dya/2)-(dya/2)*(1-(dya/2)**2)**(1/2))#\n",
+ "nt=k2*nlat##\n",
+ "lt=(-10*log10(nt))##in dB\n",
+ "print \"insertion loss at the joint = %0.3f dB\"%lt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3 : Page 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total loss = 0.75 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "#loss\n",
+ "d=100##micro meter\n",
+ "dx=0##\n",
+ "dy=3##in micro mete\n",
+ "dth=3##in degree\n",
+ "dthr=dth*(pi/180)##\n",
+ "dya=0.02##\n",
+ "n1=1.48##refrative index\n",
+ "na=1##\n",
+ "k1=n1/n1##\n",
+ "k2=1##\n",
+ "nf=((16*(n1)**2)/((n1+1)**4))##\n",
+ "nlat=(2/(pi))*(acos(dy/100)-(dy/100)*(1-(dy/100)**2)**(1/2))##\n",
+ "NA=n1*(sqrt(2*dya))##\n",
+ "nang=((1-(na*dthr)/(pi*NA)))##\n",
+ "nt=nf*nlat*nang##\n",
+ "lt=(-10*log10(nt))##in dB\n",
+ "print \"total loss = %0.2f dB\"%lt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4 : Page 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total loss = 4.1260 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "from scipy import log10\n",
+ "#loss\n",
+ "d1=80##micro meter\n",
+ "na1=0.25##\n",
+ "alpha1=2##\n",
+ "d2=60##in micro meter\n",
+ "na2=0.21##\n",
+ "alpha2=1.9##\n",
+ "ncd=(d2/d1)**2##\n",
+ "nna=(na2/na1)**2##\n",
+ "nalpha=((1+(2/alpha1))/(1+((2/alpha2))))##\n",
+ "nt=ncd*nna*nalpha##\n",
+ "lt=(-10*log10(nt))##in dB\n",
+ "print \"total loss = %0.4f dB\"%lt"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5 : Page 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "total loss forward direction = 3.52 dB\n",
+ "total loss backward direction = 0.217 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "#loss\n",
+ "d1=60##micro meter\n",
+ "na1=0.25##\n",
+ "alpha1=2.1##\n",
+ "d2=50##in micro meter\n",
+ "na2=0.20##\n",
+ "alpha2=1.9##\n",
+ "ncd=(d2/d1)**2##\n",
+ "nna=(na2/na1)**2##\n",
+ "nalpha1=1##\n",
+ "nalpha=((1+(2/alpha1))/(1+((2/alpha2))))##\n",
+ "ncd1=1##\n",
+ "nna1=1##\n",
+ "nt=ncd*nna*nalpha1##\n",
+ "ltf=(-10*log10(nt))##in dB\n",
+ "nt1=ncd1*nna1*nalpha##\n",
+ "ltb=(-10*log10(nt1))##in dB\n",
+ "print \"total loss forward direction = %0.2f dB\"%ltf\n",
+ "print \"total loss backward direction = %0.3f dB\"%ltb"
+ ]
+ }
+ ],
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}