From d36fc3b8f88cc3108ffff6151e376b619b9abb01 Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:40:35 +0530 Subject: Revised list of TBCs --- sample_notebooks/mokshagunda/Chapter_2.ipynb | 365 +++++++++++++++++++++ .../mokshagunda/Chapter_2_DIFFRACTION.ipynb | 365 --------------------- 2 files changed, 365 insertions(+), 365 deletions(-) create mode 100755 sample_notebooks/mokshagunda/Chapter_2.ipynb delete mode 100755 sample_notebooks/mokshagunda/Chapter_2_DIFFRACTION.ipynb (limited to 'sample_notebooks/mokshagunda') diff --git a/sample_notebooks/mokshagunda/Chapter_2.ipynb b/sample_notebooks/mokshagunda/Chapter_2.ipynb new file mode 100755 index 00000000..9af6a743 --- /dev/null +++ b/sample_notebooks/mokshagunda/Chapter_2.ipynb @@ -0,0 +1,365 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 DIFFRACTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_1 pg.no:29" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No of lines per centimeter is 5000\n" + ] + } + ], + "source": [ + "#To calculate the no of lines in one cm of grating surface\n", + "from math import pi,sin\n", + "k=2.\n", + "lamda=5*10**-5 #units in cm\n", + "theta=30 # units in degrees\n", + "#We have nooflines=1/e=(k∗lamda)/sin(theta)\n", + "nooflines=sin(theta*pi/180)/(k*lamda) #units in cm\n", + "print \"No of lines per centimeter is %.f\"%nooflines\n", + "#In text book the answer is printed wrong as 10ˆ3\n", + "#The correct answer is 5∗10ˆ3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_2 pg.no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "For First order spectra theta1=17.5 degrees\n", + "For Third order spectra theta3=64.2 degrees\n", + "Difference in Angles of deviation in first and third order spectra is theta3−theta1=46.70 degrees\n" + ] + } + ], + "source": [ + "#To Find the difference in angles of deviation in first and third order spectra\n", + "from math import pi,asin\n", + "lamda=5000. # units in armstrongs\n", + "lamda=lamda*10**-8 # units in cm\n", + "e=1./6000.\n", + "#For first order e∗sin(theta1)=1∗lamda\n", + "theta1=asin(lamda/e) # units in radians\n", + "theta1=theta1*180./pi # units in degrees\n", + "print \"For First order spectra theta1=%.1f degrees\"%theta1\n", + "#For third order e∗sin(theta3)=3∗lamda\n", + "theta3=asin(3.*lamda/e) # units in radians\n", + "theta3=theta3*180/pi # units in degrees\n", + "print \"For Third order spectra theta3=%.1f degrees\"%theta3\n", + "diffe=theta3-theta1 #units in degrees\n", + "print \"Difference in Angles of deviation in first and third order spectra is theta3−theta1=%.2f degrees\"%diffe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_3 pg.no:30" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false, + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No of lines per cm=196.0 \n" + ] + } + ], + "source": [ + "#To calculate minimum no of lines per centimeter\n", + "lamda1=5890 # units in armstrongs\n", + "lamda2=5896 # units in armstrongs\n", + "dlamda=lamda2-lamda1 #units in armstrongs\n", + "k=2\n", + "n=lamda1/(k*dlamda)\n", + "width=2.5 #units in cm\n", + "nooflines=n/width\n", + "print \"No of lines per cm=%.1f \"%nooflines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_4 pg.no:31" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "As total no of lines required for resolution in first order is 981 and total no of lines in grating is 850 the lines will not be resolved in first order\n", + "As total no of lines required for resolution in first order is 490 and total no of lines in grating is 850 the lines will be resolved in second order\n" + ] + } + ], + "source": [ + "#To examine two spectral lines are clearly resolved in first order and second order\n", + "n=425.\n", + "tno=2.*n\n", + "lamda1=5890 # units in armstrongs\n", + "lamda2=5896 # units in armstrongs\n", + "dlamda=lamda2 -lamda1\n", + "#For first order\n", + "n=lamda1/dlamda\n", + "print\"As total no of lines required for resolution in first order is %.f and total no of lines in grating is %d the lines will not be resolved in first order\"%(n,tno)\n", + "#For second order\n", + "n=lamda1/(2*dlamda)\n", + "print\"As total no of lines required for resolution in first order is %.f and total no of lines in grating is %d the lines will be resolved in second order\"%(n,tno)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_5 pg.no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Angle of separation is 16 minutes\n" + ] + } + ], + "source": [ + "#To find the angle of separation\n", + "from math import asin,pi\n", + "\n", + "lamda1=5016. # units in armstrongs\n", + "lamda2=5048. # units in armstrongs\n", + "lamda1=lamda1*10**-8 # units in cm\n", + "lamda2=lamda2*10**-8 # units in cm\n", + "k=2.\n", + "n=15000\n", + "e=2.54/n # units in cm \n", + "theta1=asin((2*lamda1)/e)*(180/pi) # units in in degrees\n", + "theta2=asin((2*lamda2)/e)*(180/pi) # units in in degrees\n", + "diffe=theta2-theta1 # units in in degrees\n", + "diffe=diffe*60 # units in minutes\n", + "print \"Angle of separation is %.f minutes\"%diffe" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_6 pg.no:32" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dispersive power of the grating is 15000\n" + ] + } + ], + "source": [ + "#To Calculate the dispersive power of the grating\n", + "from math import pi,asin,cos\n", + "n=4000.\n", + "e=1/n #units in cm\n", + "k=3.\n", + "lamda=5000 # units in armstrongs\n", + "lamda=lamda*10**-8 # units in cm\n", + "theta=asin((k*lamda)/e)*(180/pi) # units in degrees\n", + "costheta=cos(theta*pi/180)\n", + "disppower=(k*n)/costheta\n", + "print \"The dispersive power of the grating is %.f\"%disppower" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_7 pg.no:33" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The highest order spectrum Seen with monochromatic light is 3.33\n" + ] + } + ], + "source": [ + "#To Calculate highest power of spectrum seen with mono chromaic light\n", + "lamda=6000. # units in armstrongs\n", + "lamda=lamda*10**-8 #units in cm\n", + "n=5000.\n", + "e=1/n #units in cm\n", + "k=e/lamda\n", + "print \"The highest order spectrum Seen with monochromatic light is %.2f\"%k" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_8 pg.no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelength of the lines is 0.0000606 cms\n", + "Minimum grating width required is 4.2 cm \n" + ] + } + ], + "source": [ + "#To calculate the wavelength\n", + "from math import pi,sin\n", + "k=2.\n", + "theta1=10.\n", + "dtheta=3.\n", + "dlamda=5*10**-9\n", + "lamda=(sin((theta1*pi)/180)*dlamda*60*60)/(cos((theta1*pi)/180)*dtheta*(pi/180)) # units in cm\n", + "print \"Wavelength of the lines is %.7f cms\"%lamda\n", + "lamda_dlamda=lamda+dlamda # units in cm\n", + "N=6063\n", + "Ne=(N*k*lamda)/sin((theta1*pi)/180) # units in cm\n", + "print \"Minimum grating width required is %.1f cm \"%Ne" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_9 pg.no:35" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resolving power is 10000 \n" + ] + } + ], + "source": [ + "#To calculate resolving power in second order\n", + "#We have e∗sin(theta)=k∗lamda\n", + "#We have e∗0.2=k∗lamda −>1\n", + "#And e∗0.3=(k+1)∗lamda −>2\n", + "#Subtracting one and two 3∗0.1=lamda\n", + "lamda=5000. # units in armstrongs\n", + "lamda=lamda*10**-8 # units in cm\n", + "e=lamda/0.1 # units in cm\n", + "width=2.5 #units in cm\n", + "N=width/e\n", + "respower=2*N\n", + "print \"Resolving power is %.f \"%respower" + ] + } + ], + "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.10" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/sample_notebooks/mokshagunda/Chapter_2_DIFFRACTION.ipynb b/sample_notebooks/mokshagunda/Chapter_2_DIFFRACTION.ipynb deleted file mode 100755 index 9af6a743..00000000 --- a/sample_notebooks/mokshagunda/Chapter_2_DIFFRACTION.ipynb +++ /dev/null @@ -1,365 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Chapter 2 DIFFRACTION" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_1 pg.no:29" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "No of lines per centimeter is 5000\n" - ] - } - ], - "source": [ - "#To calculate the no of lines in one cm of grating surface\n", - "from math import pi,sin\n", - "k=2.\n", - "lamda=5*10**-5 #units in cm\n", - "theta=30 # units in degrees\n", - "#We have nooflines=1/e=(k∗lamda)/sin(theta)\n", - "nooflines=sin(theta*pi/180)/(k*lamda) #units in cm\n", - "print \"No of lines per centimeter is %.f\"%nooflines\n", - "#In text book the answer is printed wrong as 10ˆ3\n", - "#The correct answer is 5∗10ˆ3" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_2 pg.no:30" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "For First order spectra theta1=17.5 degrees\n", - "For Third order spectra theta3=64.2 degrees\n", - "Difference in Angles of deviation in first and third order spectra is theta3−theta1=46.70 degrees\n" - ] - } - ], - "source": [ - "#To Find the difference in angles of deviation in first and third order spectra\n", - "from math import pi,asin\n", - "lamda=5000. # units in armstrongs\n", - "lamda=lamda*10**-8 # units in cm\n", - "e=1./6000.\n", - "#For first order e∗sin(theta1)=1∗lamda\n", - "theta1=asin(lamda/e) # units in radians\n", - "theta1=theta1*180./pi # units in degrees\n", - "print \"For First order spectra theta1=%.1f degrees\"%theta1\n", - "#For third order e∗sin(theta3)=3∗lamda\n", - "theta3=asin(3.*lamda/e) # units in radians\n", - "theta3=theta3*180/pi # units in degrees\n", - "print \"For Third order spectra theta3=%.1f degrees\"%theta3\n", - "diffe=theta3-theta1 #units in degrees\n", - "print \"Difference in Angles of deviation in first and third order spectra is theta3−theta1=%.2f degrees\"%diffe" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_3 pg.no:30" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "collapsed": false, - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "No of lines per cm=196.0 \n" - ] - } - ], - "source": [ - "#To calculate minimum no of lines per centimeter\n", - "lamda1=5890 # units in armstrongs\n", - "lamda2=5896 # units in armstrongs\n", - "dlamda=lamda2-lamda1 #units in armstrongs\n", - "k=2\n", - "n=lamda1/(k*dlamda)\n", - "width=2.5 #units in cm\n", - "nooflines=n/width\n", - "print \"No of lines per cm=%.1f \"%nooflines" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_4 pg.no:31" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "As total no of lines required for resolution in first order is 981 and total no of lines in grating is 850 the lines will not be resolved in first order\n", - "As total no of lines required for resolution in first order is 490 and total no of lines in grating is 850 the lines will be resolved in second order\n" - ] - } - ], - "source": [ - "#To examine two spectral lines are clearly resolved in first order and second order\n", - "n=425.\n", - "tno=2.*n\n", - "lamda1=5890 # units in armstrongs\n", - "lamda2=5896 # units in armstrongs\n", - "dlamda=lamda2 -lamda1\n", - "#For first order\n", - "n=lamda1/dlamda\n", - "print\"As total no of lines required for resolution in first order is %.f and total no of lines in grating is %d the lines will not be resolved in first order\"%(n,tno)\n", - "#For second order\n", - "n=lamda1/(2*dlamda)\n", - "print\"As total no of lines required for resolution in first order is %.f and total no of lines in grating is %d the lines will be resolved in second order\"%(n,tno)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_5 pg.no:32" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Angle of separation is 16 minutes\n" - ] - } - ], - "source": [ - "#To find the angle of separation\n", - "from math import asin,pi\n", - "\n", - "lamda1=5016. # units in armstrongs\n", - "lamda2=5048. # units in armstrongs\n", - "lamda1=lamda1*10**-8 # units in cm\n", - "lamda2=lamda2*10**-8 # units in cm\n", - "k=2.\n", - "n=15000\n", - "e=2.54/n # units in cm \n", - "theta1=asin((2*lamda1)/e)*(180/pi) # units in in degrees\n", - "theta2=asin((2*lamda2)/e)*(180/pi) # units in in degrees\n", - "diffe=theta2-theta1 # units in in degrees\n", - "diffe=diffe*60 # units in minutes\n", - "print \"Angle of separation is %.f minutes\"%diffe" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_6 pg.no:32" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The dispersive power of the grating is 15000\n" - ] - } - ], - "source": [ - "#To Calculate the dispersive power of the grating\n", - "from math import pi,asin,cos\n", - "n=4000.\n", - "e=1/n #units in cm\n", - "k=3.\n", - "lamda=5000 # units in armstrongs\n", - "lamda=lamda*10**-8 # units in cm\n", - "theta=asin((k*lamda)/e)*(180/pi) # units in degrees\n", - "costheta=cos(theta*pi/180)\n", - "disppower=(k*n)/costheta\n", - "print \"The dispersive power of the grating is %.f\"%disppower" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_7 pg.no:33" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The highest order spectrum Seen with monochromatic light is 3.33\n" - ] - } - ], - "source": [ - "#To Calculate highest power of spectrum seen with mono chromaic light\n", - "lamda=6000. # units in armstrongs\n", - "lamda=lamda*10**-8 #units in cm\n", - "n=5000.\n", - "e=1/n #units in cm\n", - "k=e/lamda\n", - "print \"The highest order spectrum Seen with monochromatic light is %.2f\"%k" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_8 pg.no:35" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Wavelength of the lines is 0.0000606 cms\n", - "Minimum grating width required is 4.2 cm \n" - ] - } - ], - "source": [ - "#To calculate the wavelength\n", - "from math import pi,sin\n", - "k=2.\n", - "theta1=10.\n", - "dtheta=3.\n", - "dlamda=5*10**-9\n", - "lamda=(sin((theta1*pi)/180)*dlamda*60*60)/(cos((theta1*pi)/180)*dtheta*(pi/180)) # units in cm\n", - "print \"Wavelength of the lines is %.7f cms\"%lamda\n", - "lamda_dlamda=lamda+dlamda # units in cm\n", - "N=6063\n", - "Ne=(N*k*lamda)/sin((theta1*pi)/180) # units in cm\n", - "print \"Minimum grating width required is %.1f cm \"%Ne" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Example 2_9 pg.no:35" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Resolving power is 10000 \n" - ] - } - ], - "source": [ - "#To calculate resolving power in second order\n", - "#We have e∗sin(theta)=k∗lamda\n", - "#We have e∗0.2=k∗lamda −>1\n", - "#And e∗0.3=(k+1)∗lamda −>2\n", - "#Subtracting one and two 3∗0.1=lamda\n", - "lamda=5000. # units in armstrongs\n", - "lamda=lamda*10**-8 # units in cm\n", - "e=lamda/0.1 # units in cm\n", - "width=2.5 #units in cm\n", - "N=width/e\n", - "respower=2*N\n", - "print \"Resolving power is %.f \"%respower" - ] - } - ], - "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.10" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} -- cgit