{
 "metadata": {
  "name": "",
  "signature": "sha256:550f2c4f76d815d509a9a81031b8891ad0f830da6727cb50a9ec9ad3c5c39d1e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter5 Electron Oprtics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg 72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 5.1\n",
      "##Electron refraction, calculation of potential difference\n",
      "\n",
      "##given values\n",
      "V1=250.;##potential by which electrons are accelerated in Volts\n",
      "alpha1=50*math.pi/180.;##in degree\n",
      "alpha2=30*math.pi/180.;##in degree\n",
      "b=math.sin(alpha1)/math.sin(alpha2);\n",
      "##calculation\n",
      "V2=(b**2.)*V1;\n",
      "a=V2-V1;\n",
      "print'%s %.1f %s'%('potential difference(in volts) is:',a,'');\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "potential difference(in volts) is: 336.8 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2 -pg94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "##Example 5.2&5.3\n",
      "import math\n",
      "##Cyclotron, calculation of magnetic induction,maximum energy\n",
      "##given values\n",
      "f=12*(10**6);##oscillator frequency in Hertz\n",
      "r=.53;##radius of the dee in metre\n",
      "q=1.6*10**-19;##Deuteron charge in C\n",
      "m=3.34*10**-27;##mass of deuteron in kg\n",
      "##calculation\n",
      "B=2*math.pi*f*m/q;##\n",
      "print'%s %.2f %s'%('magnetic induction (in Tesla) is:',B,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetic induction (in Tesla) is: 1.57 \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Cyclotron, calculation of magnetic induction,maximum energy\n",
      "##given values\n",
      "f=12.*(10**6);##oscillator frequency in Hertz\n",
      "r=.53;##radius of the dee in metre\n",
      "q=1.6*10**-19;##Deuteron charge in C\n",
      "m=3.34*10**-27;##mass of deuteron in kg\n",
      "##calculation\n",
      "B=2*math.pi*f*m/q;##\n",
      "\n",
      "E=B**2*q**2.*r**2./(2.*m);\n",
      "print'%s %.2e %s'%('maximum energy to which deuterons can be accelerated (in J) is',E,'')\n",
      "E1=E*6.24*10**18/10**6.;##conversion of energy into MeV\n",
      "print'%s %.1f %s'%('maximum energy to which deuterons can be accelerated (in MeV) is',E1,'');\n",
      "print('in text book ans is given wrong')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum energy to which deuterons can be accelerated (in J) is 2.67e-12 \n",
        "maximum energy to which deuterons can be accelerated (in MeV) is 16.6 \n",
        "in text book ans is given wrong\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg99"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 5.4\n",
      "##Mass spectrograph, calculation of linear separation of lines formed on photographic plates\n",
      "\n",
      "##given values;\n",
      "E=8.*10**4;##electric field in V/m\n",
      "B=.55##magnetic induction in Wb/m*2\n",
      "q=1.6*10**-19;##charge of ions\n",
      "m1=20.*1.67*10**-27;##atomic mass of an isotope of neon\n",
      "m2=22.*1.67*10**-27;##atomic mass of other isotope of neon\n",
      "##calculation\n",
      "x=2*E*(m2-m1)/(q*B**2);##\n",
      "print'%s %.3f %s'%('separation of lines (in metre) is:',x,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "separation of lines (in metre) is: 0.011 \n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}