{ "metadata": { "name": "", "signature": "sha256:dc1d02c818142fc43f1bb36bcc3b4789ed6aba6b82727804f7035772e1b68c40" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter7-Interface and Diffraction" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "##Example 7.1\n", "##plane parallel thin film\n", "\n", "##given values\n", "x=5890*10**-10;##wavelength of light in metre\n", "n=1.5;##refractive index\n", "r=60*math.pi/180.;##angle of refraction in degree\n", " ##calculation\n", "t=x/(2*n*math.cos(r));\n", "print'%s %.2f %s'%('thickness of plate (in micrometre) is:',t*10**6,'');" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "thickness of plate (in micrometre) is: 0.39 \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg151" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "##Example 7.2\n", "##wedge shaped thin film\n", "\n", "##given values\n", "x=5893*10**-10.;##wavelength of light in metre\n", "n=1.5;##refractive index\n", "y=.1*10**-3.;##fringe spacing\n", " ##calculation\n", "z=x/(2.*n*y);##angle of wedge\n", "alpha=z*180./math.pi;##conversion of radian into degree\n", "print'%s %.2f %s'%('angle of wedge (in degree) is:',alpha,'');" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "angle of wedge (in degree) is: 0.11 \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "##Example 7.3\n", "##Newton's ring experiment- calculation of refractive index\n", "\n", "##given values\n", "D1=1.5;##diametre (in cm)of tenth dark ring in air\n", "D2=1.27;##diametre (in cm)of tenth dark ring in liquid\n", "\n", "\n", " ##calculation\n", "n=D1**2./D2**2.;\n", "print'%s %.2f %s'%('refractive index of liquid is',n,'');" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "refractive index of liquid is 1.40 \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-160" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "##Example 7.4\n", "##nonreflecting film\n", "\n", "##given values\n", "l=5500*10**-10.;##wavelength of light\n", "n1=1.33;##refractive index of water\n", "n2=1.52;##refractive index of glass window pane\n", "x=math.sqrt(n1);##to check if it is nonreflecting\n", "\n", " ##calculation\n", "t=l/(4.*n1);##thickness of water film required\n", "print'%s %.2f %s'%('minimum thickness of film (in metre) is',t*10**6,'');" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "minimum thickness of film (in metre) is 0.10 \n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }