{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#chapter 8:direction and measurment of activity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.1;pg no: 120"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.1, Page:120  \n",
      " \n",
      "\n",
      "The potential signal recorded will be (mV)= 1.33\n"
     ]
    }
   ],
   "source": [
    "#cal of potential signal\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.1, Page:120  \\n \\n\"\n",
    "#Given:\n",
    "e=1.6*10**-19;# electron charge\n",
    "C=6*10**-12;# in F\n",
    "N=10**5;# # electron multiplication\n",
    "#Solution:\n",
    "e1=N*e;\n",
    "v=e1/(2*C);\n",
    "v1=1000*v;\n",
    "print\"The potential signal recorded will be (mV)=\",round(v1,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.2;pg no: 120"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.2, Page:120  \n",
      " \n",
      "\n",
      "The capacitance that would be required in (nF)= 8.0\n"
     ]
    }
   ],
   "source": [
    "#cal of capacitance that would be required\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.2, Page:120  \\n \\n\"\n",
    "# Given:\n",
    "N=10**5;# electron multiplication\n",
    "v=10**-6;# in V\n",
    "e=1.6*10**-19;# electron charge\n",
    "\n",
    "# Solution:\n",
    "e1=N*e;\n",
    "C=e1/(2*v);\n",
    "C1=C*10**9;\n",
    "print\"The capacitance that would be required in (nF)=\",C1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.3;pg no: 120"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.3, Page:120  \n",
      " \n",
      "\n",
      "The alpha coefficient in electrons electron^-1 cm^-1= 4.4\n"
     ]
    }
   ],
   "source": [
    "#cal of alpha coefficient\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "import math\n",
    "print\"Example 8.3, Page:120  \\n \\n\"\n",
    "# Given:\n",
    "n0=1;# initial primary electrons\n",
    "n=1.6*10**4;\n",
    "x=2.2; #distance in cm\n",
    "\n",
    "# Solution:\n",
    "a=math.log(n/n0)/(x);\n",
    "\n",
    "print\"The alpha coefficient in electrons electron^-1 cm^-1=\",round(a,2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.4;pg no: 121"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.4, Page:121  \n",
      " \n",
      "\n",
      "\n",
      " The potential at the inner surface is = (V) 1600.0\n",
      "\n",
      " The field at the inner surface is =(V/cm) 411.8\n",
      "\n",
      " \n",
      " The potential at the outer surface is =(V) 0.0\n",
      "\n",
      " The field at the outer surface in (V/cm)= 30.88\n",
      "\n",
      " \n",
      " The potential in mid-way between the cylinder is =(V) 383.482616627\n",
      "\n",
      " The field in mid-way between the cylinderis =(V/cm) 57.46\n"
     ]
    }
   ],
   "source": [
    "#cal of potential,field\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.4, Page:121  \\n \\n\"\n",
    "# Given:\n",
    "import math\n",
    "V=1600.;# potential across the electrodes\n",
    "di=3.;# inner diameter\n",
    "do=40.;# outer diameter\n",
    "a=1.5;#in mm\n",
    "A=20.;#in mm\n",
    "\n",
    "# Solution:\n",
    "# Part(a)At the inner surface\n",
    "r1=1.5;# in mm\n",
    "V1=V*(math.log(A/r1)/math.log(A/a));\n",
    "X1=V/(r1*(math.log(A/a)));\n",
    "print\"\\n The potential at the inner surface is = (V)\",V1\n",
    "print\"\\n The field at the inner surface is =(V/cm)\",round(X1,2)\n",
    "# Part(b)At the outer surface\n",
    "r2=20.;# in mm\n",
    "V2=V*(math.log(A/r2)/math.log(A/a));\n",
    "X2=V/(r2*(math.log(A/a)));\n",
    "print\"\\n \\n The potential at the outer surface is =(V)\",V2\n",
    "print\"\\n The field at the outer surface in (V/cm)=\",round(X2,2)\n",
    "# Part(c)In mid-way between the cylinder\n",
    "r3=(A+a)/2.;# in mm\n",
    "V3=V*(math.log(A/r3)/math.log(A/a));\n",
    "X3=V/(r3*(math.log(A/a)));\n",
    "print\"\\n \\n The potential in mid-way between the cylinder is =(V)\",V3\n",
    "print\"\\n The field in mid-way between the cylinderis =(V/cm)\",round(X3,3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.5;pg no: 122"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.5, Page:122  \n",
      " \n",
      "\n",
      "The resolving time of the given system in microseconds is = 1711.0\n"
     ]
    }
   ],
   "source": [
    "#cal of resolving time\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.5, Page:122  \\n \\n\"\n",
    "# Given:\n",
    "ma1=3600.;# counts in 3 min\n",
    "mb1=2400.;# counts in 5 min\n",
    "mab1=9900.;# counts in 6 min\n",
    "\n",
    "# Solution:\n",
    "ma=ma1/3;\n",
    "mb=mb1/5;\n",
    "mab=mab1/6;\n",
    "\n",
    "t1=(ma+mb-mab)/(mab**2-ma**2-mb**2);\n",
    "t2=t1*60;# in seconds\n",
    "t=t2*1000000;# in microseconds\n",
    "print\"The resolving time of the given system in microseconds is =\",round(t)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.6;pg no: 122"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.6, Page:122  \n",
      " \n",
      "\n",
      "The resolving time of the given system in microseconds is = 2490.0\n",
      "\n",
      " The true count rate of unknown sample in (cpm)= 2868.0\n"
     ]
    }
   ],
   "source": [
    "#cal of The resolving time,true count rate\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.6, Page:122  \\n \\n\"\n",
    "# Given:\n",
    "ma1=3321.;# counts in 3 min\n",
    "mb1=2862.;# counts in 2 min\n",
    "mab1=4798.;# counts in 2 min\n",
    "m=1080.;# counts in 30 min\n",
    "muk1=5126.;# counts in 2 min\n",
    "# Solution:\n",
    "ma=ma1/3.;\n",
    "mb=mb1/2.;\n",
    "mab=mab1/2.;\n",
    "mbc=m/30.;\n",
    "muk=muk1/2.;\n",
    "t1=(ma+mb-mab-mbc)/(mab**2.-ma**2.-mb**2.);# in min\n",
    "t2=t1*60.;# in seconds\n",
    "t=t2*1000000.;# in microseconds\n",
    "print\"The resolving time of the given system in microseconds is =\",round(t)\n",
    "n=muk/(1-muk*t1);# true count rate\n",
    "print\"\\n The true count rate of unknown sample in (cpm)=\",round(n)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 8.7;pg no: 123"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 8.7, Page:123  \n",
      " \n",
      "\n",
      "\n",
      " The resolving time of the given system in microseconds is = 227.74452861\n",
      "\n",
      "  The counting loss of sample A in (cpm)= 359.0\n",
      "\n",
      "  The counting loss of sample B in (cpm)= 460.0\n",
      "\n",
      "  The counting loss of sample AB in (cpm)= 1523.0\n"
     ]
    }
   ],
   "source": [
    "#cal of counting loss of sample A,B,C\n",
    "#intiation of all variables\n",
    "# Chapter 8\n",
    "print\"Example 8.7, Page:123  \\n \\n\"\n",
    "# Given:\n",
    "\n",
    "ma=9728.;# cpm\n",
    "mb=11008.;# cpm\n",
    "mab=20032.;# cpm\n",
    "\n",
    "# Solution:\n",
    "\n",
    "t1=(ma+mb-mab)/(mab**2-ma**2-mb**2);# in min\n",
    "\n",
    "t2=t1*60;# in seconds\n",
    "t=t2*1000000;# in microseconds\n",
    "print\"\\n The resolving time of the given system in microseconds is =\",t\n",
    "\n",
    "#From true count rate equation we have, n=muk/(1-muk*t).\n",
    "# This implies, n-m=m^2*t where n-m corresponds to counting loss\n",
    "na=ma**2*t1;# For sample A\n",
    "nb=mb**2*t1;# For sample B\n",
    "nab=mab**2*t1;# For sample AB\n",
    "print\"\\n  The counting loss of sample A in (cpm)=\",round(na)\n",
    "print\"\\n  The counting loss of sample B in (cpm)=\",round(nb)\n",
    "print\"\\n  The counting loss of sample AB in (cpm)=\",round(nab)\n",
    "# NOTE: The resolving time of the given system in microseconds is give 222.7. This is a calculation error in the textbook."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "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
}
