{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2: Diffraction of light" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.10: Calculate_total_angular_width.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_10,Page 2-34\n", "clc()\n", "\n", "//Given Data:\n", "lam=6*10^-7 //Wavelength of light\n", "a=0.02*10^-2 //width of slit (a=d)\n", "f=2 //distance between screen and slit\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=m*lam, here m=1\n", "theta=asin(lam/a)*180*60/%pi //angular position in first minima (1 degree=60 minutes)\n", "printf('Total angular width is = %.2f minutes \n \n',2*theta)\n", "\n", "x=f*lam/a //separation between central maxima and first minima\n", "printf(' Linear width is = %.6f m \n',2*x)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.11: Find_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_11,Page 2-35\n", "clc()\n", "\n", "//Given Data:\n", "a=0.14*10^-3 //width of slit\n", "n=2 //order\n", "y=1.6*10^-2 //separation between second dark band and central bright band\n", "D=2 //distance between screen and slit\n", "\n", "//Calculations:\n", "\n", "theta=y/D //from diagram \n", "\n", "//We know, a*sin(theta)=n*lam\n", "//here sin(theta)=theta\n", "lam=a*theta/n //wavelength of light\n", "printf('wavelength of light is = %.10f m \n',lam)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.13: Find_angles_of_maxima.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_13,Page 2-36\n", "clc()\n", "\n", "//Given Data:\n", "lam=6.328*10^-7 //Wavelength of light\n", "N=1/6000*10^-2 //N=(a+b) grating element\n", "\n", "//Calculations:\n", "\n", "//We know, N*sin(theta)=m*lam\n", "theta1=asin(1*lam/N)*180/%pi //angular position in first order maxima,m=1\n", "printf('Angular position in first order maxima is = %.2f degrees \n \n',theta1)\n", "\n", "theta2=asin(2*lam/N)*180/%pi //angular position in second order maxima,m=2\n", "printf(' Angular position in second order maxima is = %.2f degrees \n',theta2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.14: Calculate_grating_element.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_14,Page 2-37\n", "clc()\n", "\n", "//Given Data:\n", "lam1=6*10^-7 //wavelength of yellow light\n", "lam2=4.8*10^-7 //wavelength of blue light\n", "theta=asin(3/4) //angle of diffraction\n", "\n", "//Calculations:\n", "\n", "//for consecutive bands, n*lam1=(n+1)*lam2. thus,\n", "n=lam2/(lam1-lam2) //order\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "N=n*lam1/sin(theta) //N=(a+b) grating element\n", "printf('Grating element (a+b) is = %.8f m \n',N)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.15_1: Compute_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_15_1,Page 2-54\n", "clc()\n", "\n", "//Given Data:\n", "a=0.2*10^-3 //width of slit\n", "n=1 //order\n", "y=0.5*10^-2 //separation between first minima and central bright band\n", "D=2 //distance between screen and slit\n", "\n", "//Calculations:\n", "\n", "theta=y/D //from diagram \n", "\n", "//We know, a*sin(theta)=n*lam\n", "//here sin(theta)=theta\n", "lam=a*theta/n //wavelength of light\n", "printf('wavelength of light is = %.10f m \n',lam)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.15_2: Find_number_of_lines_per_cm.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_15_2,Page 2-55\n", "clc()\n", "\n", "//Given Data:\n", "lam1=5.4*10^-7 //Wavelength of light\n", "lam2=4.05*10^-7 //Wavelength of light\n", "theta=30*%pi/180 //angle of diffraction\n", "\n", "//Calculations:\n", "//We know, (a+b)*sin(theta)=n*lam\n", "//n*lam1=(n+1)*lam2, we get \n", "n=3\n", "N=sin(theta)/(n*lam1)*10^-2 //Number of lines per m= 1/(a+b)*10^-2\n", "printf('Number of lines per cm is = %.0f \n',N)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.15_4: Check_whether_lines_are_resolved_or_not.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_15_4,Page 2-56\n", "clc()\n", "\n", "//Given Data:\n", "GE=1/6000*10^-2 //GE=(a+b) grating element\n", "lam1=5.893*10^-7 //Wavelength of light\n", "lam2=5.896*10^-7 //Wavelength of light\n", "m=2 //order\n", "\n", "//Calculations:\n", "theta1=asin(m*lam1/GE)*180/%pi //angular position in first minima\n", "theta2=asin(m*lam2/GE)*180/%pi //angular position in second minima\n", "\n", "as=(theta2-theta1) //Angular separation in minutes\n", "printf('Angular separation is = %.3f degrees \n \n',as)\n", "\n", "dlam=lam2-lam1 //difference in wavelength\n", "lam=(lam2+lam1)/2 //Mean wavelength\n", "\n", "//We know that R.P.=lam/dlam=m*N\n", "N=lam/dlam/m //Number of lines on grating for first order\n", "printf(' Number of lines on grating for first order is = %.0f \n \n',N)\n", "printf(' But, number of lines per cm on grating is 6000. \n Which is greater than number of lines per cm needed for resolution. \n')\n", "printf(' Hence, both lines will be well resolved in 2nd order.')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.17: Calculate_wavelength_and_deduce_missing_order.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_17,Pad 2-39\n", "clc()\n", "\n", "//Given Data:\n", "d=0.04*10^-2 //Separation between slits\n", "D=1.7 //distance between screen and slit\n", "B=0.25*10^-2 //Fringe spacing\n", "\n", "//Calculations:\n", "//We know,B=D*lam/d\n", "lam=B*d/D //Wavelength of light\n", "printf('Wavelength of light is = %.10f m \n \n',lam)\n", "\n", "//The condition for missing order is,\n", "//(a+b)/a = m/n\n", "b=0.04*10^-2 //Separation in slits\n", "a=0.08*10^-3 //Slit width\n", "n=(a+b)/a //missing orders for m=1,2,3\n", "\n", "n1=1*n\n", "n2=2*n\n", "n3=3*n\n", "printf(' Missing orders are = %.0f',n1)\n", "printf(', %.0f',n2)\n", "printf(', %.0f',n3)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.18: Find_maximum_order_visible.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_18,Page 2-39\n", "clc()\n", "\n", "//Given Data:\n", "N=2.54/2620*10^-2 //N=(a+b) grating element\n", "lam=5*10^-7 //Wavelength of red light\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=n*lam\n", "//maximum value of sin(theta)=1\n", "n=N/lam //Maximum number of orders visible\n", "printf('Maximum number of orders visible is = %.0f ',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.19: Find_number_of_orders_visible.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_19,Page 2-40\n", "clc()\n", "\n", "//Given Data:\n", "N=1/4000*10^-2 //N=(a+b) grating element\n", "lam1=5*10^-7 //Wavelength of light\n", "lam2=7.5*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=n*lam\n", "//maximum value of sin(theta)=1\n", "n1=N/lam1 //Maximum number of orders visible\n", "n2=N/lam2 //Maximum number of orders visible\n", "printf('The observed number of orders range between = %.0f ',n2)\n", "printf('to %.0f',n1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.1: Find_longest_wavelength.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_1,Page 2-30\n", "clc()\n", "\n", "//Given Data:\n", "m=4 //order\n", "N=1/5000*10^-2 //N=(a+b) grating element\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "//for longest wavelength, sin(theta)=1\n", "lam=N/m //longest wavelength\n", "printf('The longest wavelength is =%.10f m',lam)\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.20: Find_wavelength_that_coincides.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_20,Page 2-40\n", "clc()\n", "\n", "//Given Data:\n", "n=5 //order\n", "lam=6*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "//We know, a*sin(theta)=n*lam\n", "//n*lam=n1*lam1\n", "lam1=n*lam/4 //for n1=4\n", "printf('For n1=4 wavelength is = %.10f \n',lam1)\n", "\n", "lam2=n*lam/5 //for n1=5\n", "printf(' For n1=5 wavelength is = %.10f \n',lam2)\n", "\n", "lam3=n*lam/6 //for n1=6\n", "printf(' For n1=6 wavelength is = %.10f \n',lam3)\n", "\n", "lam4=n*lam/7 //for n1=7\n", "printf(' For n1=7 wavelength is = %.10f \n',lam4)\n", "\n", "lam5=n*lam/8 //for n1=8\n", "printf(' For n1=8 wavelength is = %.10f \n',lam5)\n", "\n", "printf('So,in the grating spectrum spectrum lines with wavelengths n1=6 and n1=7 will coincide with fifth order line of 6*10^-7 m')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.21: Calculate_Dispersive_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_21,Page 2-41\n", "clc()\n", "\n", "//Given Data:\n", "GE=18000*10^-10 //GE=(a+b) grating element\n", "lam=5*10^-7 //Wavelength of red light\n", "\n", "//Calculations:\n", "DP1=1/sqrt(GE^2-lam^2)*10^-10 //Dispersive power\n", "printf('Dispersive power for first order is = %.10f rad/Angstrom \n \n',DP1)\n", "\n", "m=3\n", "DP2=1/sqrt((GE/m)^2-lam^2)*10^-10 //Dispersive power\n", "printf(' Dispersive power for second order is = %.10f rad/Angstrom \n \n',DP2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.22: Find_linear_and_angular_dispersion.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_22,Page 2-42\n", "clc()\n", "\n", "//Given Data:\n", "N=2.54/15000*10^-2 //N=(a+b) grating element\n", "lam=5.9*10^-7 //Wavelength of light\n", "m=2 //order\n", "f=25*10^-2 //focal length of lens\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "theta=asin(m*lam/N) //angular position in first minima\n", "\n", "Ad=m/N/cos(theta) //angular dispersion\n", "\n", "ld=f*Ad*10^-8 //linear dispersion (dx/dl) in cm/angstrom\n", "printf('Linear dispersion in spectrograph is = %.5f cm/angstrom \n \n',ld)\n", "\n", "dlam=(5896-5890) //difference in wavelength\n", "dx=ld*dlam*10^-2 //separation between spectral lines in meter\n", "printf(' Separation between spectral lines is = %.5f m \n \n',dx)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.23: Calculate_number_of_lines.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_23,Page 2-47\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam1=5.89*10^-7 //Wavelength of light\n", "lam2=5.896*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "dlam=lam2-lam1 //difference in wavelength\n", "lam=(lam2+lam1)/2 //Mean wavelength\n", "\n", "//We know that R.P.=m*N=lam/dlam\n", "N=lam/dlam/m //minimum number of lines which will just resolve\n", "printf('Minimum number of lines which will just resolve is = %.1f \n \n',N)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.24: Calculate_resolving_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_24,Page 2-47\n", "clc()\n", "\n", "//Given Data:\n", "N=5*5000 //N=W/(a+b) Number of lines on grating\n", "m=2 //order\n", "lam=6*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "//i)\n", "RP=m*N //Resolving power\n", "printf('i)Resolving power is = %.0f \n \n',RP)\n", "\n", "//ii)\n", "//We know that R.P.=lam/dlam\n", "dlam=lam/RP //Smallest wavelength which can be resolved\n", "printf(' ii)Smallest wavelength which can be resolved is = %.12f m \n \n',dlam)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.25: Calculate_Dispersive_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_25,Page 2-48\n", "clc()\n", "\n", "//GiveGE Data:\n", "GE=1/4000*10^-2 //GE=(a+b) grating element\n", "lam=5*10^-7 //Wavelength of red light\n", "m=3 //order\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "theta=asin(m*lam/GE) //angular position in first minima\n", "\n", "DP=m/(GE*cos(theta))*10^-2 //Dispersive power\n", "printf('Dispersive power is = %.0f \n \n',DP)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.26: Calculate_grating_element.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_26,Page 2-48\n", "clc()\n", "\n", "//Given Data:\n", "m=2 //order\n", "lam=6*10^-7 //Wavelength of light\n", "dlam=6*10^-10 //difference in wavelength\n", "W=2*10^-2 //Width of surface\n", "\n", "//Calculations:\n", "\n", "//We know that R.P.=lam/dlam=m*N\n", "N=lam/dlam/m //Number of lines on grating\n", "GE=W/N //Grating element=(a+b)\n", "printf('Grating element is = %.6f cm \n \n',GE)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.27: Calculate_angular_separation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_27,Page 2-49\n", "clc()\n", "\n", "//Given Data:\n", "m=2 //order\n", "lam1=5.77*10^-7 //Wavelength of light\n", "lam2=5.791*10^-7 //Wavelength of light\n", "GE=1/6000*10^-2 //GE=(a+b) grating element\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "theta1=asin(m*lam1/GE)*180/%pi //angular position in first minima\n", "theta2=asin(m*lam2/GE)*180/%pi //angular position in second minima\n", "\n", "as=(theta2-theta1)*60 //Angular separation in minutes\n", "printf('Angular separation is = %.0f minutes \n \n',as)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.28: Find_the_angle_of_first_dark_band.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_28,Page 2-49\n", "clc()\n", "\n", "//Given Data:\n", "n=1 //order\n", "lam=5.89*10^-7 //Wavelength of light\n", "a=0.3*10^-3 //width of slit\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=n*lam\n", "theta1=asin(n*lam/a)*180/%pi*60 //angular position in first dark band in minutes\n", "printf('Angular position in first dark band is = %.1f minutes \n \n',theta1)\n", "\n", "//We know,for bright band a*sin(theta)=(2n+1)*lam/2\n", "theta2=asin(1.5*lam/a)*180/%pi*60 //angular position in first bright band in minutes\n", "printf(' Angular position in first bright band is = %.0f minutes',theta2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.29: Calculate_maximum_order_of_spectrum.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_29,Page 2-50\n", "clc()\n", "\n", "//Given Data:\n", "GE=2.54/16000*10^-2 //GE=(a+b) grating element\n", "lam=6*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "//maximum value of sin(theta)=1\n", "m=GE/lam //Maximum order of spectra\n", "printf('Maximum order of spectra is = %.1f \n \n',m)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.2: Calculate_width_of_slit.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_2,Page 2-30\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam=6.5*10^-7 //Wavelength of red light\n", "theta=30*%pi/180 //angle of diffraction\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=m*lam\n", "a=m*lam/sin(theta) //width of slit\n", "printf('width of slit is = %.7f m',a)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.30: Find_maximum_resolving_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_30,Page 2-50\n", "clc()\n", "\n", "//Given Data:\n", "GE=1/5000*10^-2 //GE=(a+b) grating element\n", "lam=5.89*10^-7 //Wavelength of light\n", "N=3*5000 //N=W/(a+b) Number of lines on grating\n", " \n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "//maximum value of sin(theta)=1\n", "m=GE/lam //Maximum order of spectra\n", "printf('Maximum order of spectra is = %.0f \n \n',m)\n", "\n", "RP=3*N //Resolving power (round of m to 3)\n", "printf('Resolving power is = %.0f \n \n',RP)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.32: Find_number_of_lines.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_32,Page 2-52\n", "clc()\n", "\n", "//Given Data:\n", "lam1=5.89*10^-7 //Wavelength of light\n", "lam2=5.896*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "dlam=lam2-lam1 //difference in wavelength\n", "lam=(lam2+lam1)/2 //Mean wavelength\n", "\n", "//i)\n", "m1=1 //first order\n", "//We know that R.P.=lam/dlam=m*N\n", "N1=lam/dlam/m1 //Number of lines on grating\n", "printf('i)Number of lines on grating for first order is = %.0f \n \n',N1)\n", "\n", "//ii)\n", "m2=2 //second order\n", "//We know that R.P.=lam/dlam=m*N\n", "N2=lam/dlam/m2 //Number of lines on grating\n", "printf(' ii)Number of lines on grating for second order is = %.0f \n \n',N2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.33: Calculate_number_of_lines.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2-33,Page 2-48\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam=6.553*10^-7 //Wavelength of light\n", "dlam=1.8*10^-10 //difference in wavelength\n", "\n", "\n", "//Calculations:\n", "\n", "//We know that R.P.=lam/dlam=m*N\n", "N=lam/dlam/m //Number of lines on grating\n", "printf('Number of lines on grating is = %.0f \n \n',N)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.34: Find_resolution_possible_or_not.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_34,Page 2-53\n", "clc()\n", "\n", "//Given Data:\n", "lam1=5.14034*10^-7 //Wavelength of light\n", "lam2=5.14085*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "dlam=lam2-lam1 //difference in wavelength\n", "lam=(lam2+lam1)/2 //Mean wavelength\n", "\n", "//We know that R.P.=lam/dlam=m*N\n", "N=lam/dlam/1 //Number of lines on grating\n", "printf('Number of lines on grating for first order is = %.0f \n \n',N)\n", "\n", "//Hence R.P. for second order should be\n", "RP1=2*N\n", "printf(' Resolving power in second order should be is= %.0f \n \n',RP1)\n", "//But here,\n", "\n", "lam3=8.03720*10^-7 //Wavelength of light\n", "lam4=8.03750*10^-7 //Wavelength of light\n", "dlam2=lam4-lam3 //difference in wavelength\n", "lam2=(lam4+lam3)/2 //Mean wavelength\n", "\n", "RP2=lam2/dlam2\n", "printf(' Resolving power in second order is= %.0f \n \n',RP2)\n", "\n", "printf(' So, the grating will not be able to resolve 8.0372*10^-7 and 8.03750*10^-7 in second order.\n')\n", "printf(' Because Resolving power is greter than actual Resolving power.')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.35: Show_that_First_order_spectra_is_possible.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_35,Page 2-53\n", "clc()\n", "\n", "//For grating , Condition of maxima is (a+b)sin(theta)=n*lam\n", "//Given (a+b) < 2*lam\n", "//For maximum order, sin(90)=1\n", "//So, n must be less than 2\n", "//i.e. only first order possible if width of grating element is less than twice the wavelength\n", "printf('Hence, Only first order possible if width of grating element is less than twice the wavelength.')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.36: Calculate_angle_of_first_dark_band.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_36,Page 2-54\n", "clc()\n", "\n", "//Given Data:\n", "n=1 //order\n", "lam=5.89*10^-7 //Wavelength of light\n", "a=0.3*10^-3 //width of slit\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=n*lam\n", "theta1=asin(n*lam/a)*180/%pi //angular position in first dark band\n", "printf('Angular position in first dark band is = %.3f degrees \n \n',theta1)\n", "\n", "//We know,for bright band a*sin(theta)=(2n+1)*lam/2\n", "theta2=asin(1.5*lam/a)*180/%pi //angular position in first bright band\n", "printf(' Angular position in first bright band is = %.3f degrees',theta2)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.3: Calculate_angular_position_of_first_minima.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_3,Page 2-31\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam=4*10^-7 //Wavelength of light\n", "a=10^-6 //width of slit\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=m*lam\n", "theta=asin(m*lam/a)*180/%pi //angular position in first minima\n", "printf('angular position in first minima is = %.2f degrees',theta)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.4: Find_angular_breadth.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_4,Page 2-31\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam1=4*10^-7 //Wavelength of light\n", "lam2=7*10^-7 //Wavelength of light\n", "n=1/6000*10^-2 //n=(a+b) grating element\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "theta1=asin(m*lam1/n)*180/%pi //angle of diffraction\n", "theta2=asin(m*lam2/n)*180/%pi //angle of diffraction\n", "d=theta2-theta1 //angular breadth of first order visible spectrum\n", "printf('angular breadth of first order visible spectrum is = %.2f degrees',d)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.5: Calculate_total_number_of_lines_on_grating.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_5,Page 2-31\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam=6.56*10^-7 //Wavelength of red light\n", "theta=18.25*%pi/180 //angle of diffraction\n", "W=2*10^-2 //width of grating\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "N=sin(theta)/(m*lam) //N-number of lines per m, N=1/(a+b)\n", "Tn=N*W //Total number of lines on grating\n", "printf('Total number of lines on grating is = %.0f ',Tn)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.7: Show_that_spectra_either_overlap_or_are_isolated.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_7,Page 2-33\n", "clc()\n", "\n", "//Given Data:\n", "GE=2.54/15000*10^-2 //GE=(a+b) grating element\n", "lam1=4*10^-7 //Wavelength of light\n", "lam2=7*10^-7 //Wavelength of light\n", "\n", "//Calculations:\n", "\n", "//We know, (a+b)*sin(theta)=m*lam\n", "theta11=asin(1*lam1/GE)*180/%pi //angular position of first minima for lam1\n", "theta12=asin(2*lam1/GE)*180/%pi //angular position of second minima for lam1\n", "theta13=asin(3*lam1/GE)*180/%pi //angular position of third minima for lam1\n", "\n", "theta21=asin(1*lam2/GE)*180/%pi //angular position of first minima for lam2\n", "theta22=asin(2*lam2/GE)*180/%pi //angular position of second minima for lam2\n", "theta23=asin(3*lam2/GE)*180/%pi //angular position of third minima for lam2\n", "\n", "printf('Thus the angular position for lam1 and lam2 are as follows: \n \n ')\n", "printf('First order: %.0f degrees',theta11)\n", "printf(' %.0f degrees --Isolated \n',theta21)\n", "\n", "printf(' Second order: %.0f degrees',theta12)\n", "printf(' %.0f degrees --Overlap \n',theta22)\n", "\n", "printf(' Third order: %.0f degrees',theta13)\n", "printf(' %.0f degrees --Overlap \n',theta23)\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.8: Calculate_separation_between_central_maxima_and_first_minima.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_8,Page 2-34\n", "clc()\n", "\n", "//Given Data:\n", "lam=5.893*10^-7 //Wavelength of light\n", "d=0.01*10^-2 //width of slit (a=d)\n", "f=1 //distance between screen and slit\n", "\n", "//Calculations:\n", "x=f*lam/d //separation between central maxima and first minima\n", "printf('Separation between central maxima and first minima is = %.6f m \n',x)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 2.9: Find_angular_width.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//Chapter-2,Example 2_9,Page 2-34\n", "clc()\n", "\n", "//Given Data:\n", "m=1 //order\n", "lam=6*10^-7 //Wavelength of light\n", "a=12*10^-7 //width of slit\n", "\n", "//Calculations:\n", "\n", "//We know, a*sin(theta)=m*lam\n", "theta=asin(m*lam/a)*180/%pi //angular position in first minima\n", "printf('Half angular width of first maxima is = %.0f degrees',theta)" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }