{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 25 : Optical Instruments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 Page No: 827"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a) focal length f = 50.00 cm\n",
      "b) Power of the lens = 2.00 diopters\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "q=-50 # Near point of an eye in cm\n",
    "p=25 #object location in cm\n",
    "#a) focal length calculation\n",
    "#Using Thin Lens equation 1/f=((1/p)+(1/q))\n",
    "f=p*q/(p+q)\n",
    "print \"a) focal length f = %0.2f cm\"%f\n",
    "#b) power of the lens\n",
    "f1=50*10**-2# focal length in meters\n",
    "P=1/f1\n",
    "print \"b) Power of the lens = %0.2f diopters\"%P"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 Page No: 830"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a) Maximum angular magnification of the lens : 3.50\n",
      "Angular Magnification of lens when eye is relaxed : 2.50\n"
     ]
    }
   ],
   "source": [
    "f=10 # focal length in cm\n",
    "#a)Maximum angular magnification\n",
    "M_max=1+(25/f)\n",
    "print \"a) Maximum angular magnification of the lens : %0.2f\"%M_max\n",
    "m=25/f\n",
    "print \"Angular Magnification of lens when eye is relaxed : %0.2f\"%m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4 Page No: 832"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnification of microscope with two long focal lengths : -45.00\n",
      "Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : -90.00\n",
      "Magnification of microscope with a combination of 20 mm objective  and 2.5 cm eyepiece : -450.00 \n",
      "Possible magnification of microscope with two short focal lengths : -900.00\n"
     ]
    }
   ],
   "source": [
    "#interchangeable objectives\n",
    "f1=2 # focal length in cm\n",
    "f2=0.2 #focal length in cm\n",
    "#data of two eye pieces\n",
    "f3=5 #focal length in cm\n",
    "f4=2.5 #focal length in cm\n",
    "L=18 # length of microscope\n",
    "#Calculation of magnification for four combinations of lens\n",
    "#magnification of compound microscope  m =-(L/fo)*(25cm/fe) where fo is shortest  focal length compared to fe\n",
    "#combination of two long focal lengths\n",
    "m1=-(L/f1)*(25/f3)\n",
    "print \"Magnification of microscope with two long focal lengths : %0.2f\"%m1\n",
    "#combination of 20 mm objective  and 2.5 cm eyepiece\n",
    "m2=-(L/f1)*(25/f4)\n",
    "print \"Magnification of microscope with a combination of 20 mm objective and 2.5 cm eyepiece : %0.2f\"%m2\n",
    "#combination of 2 mm objective  and 5 cm eyepiece\n",
    "m3=-(L/f2)*(25/f3)\n",
    "print \"Magnification of microscope with a combination of 20 mm objective  and 2.5 cm eyepiece : %0.2f \"%m3\n",
    "#combination of two short focal lengths\n",
    "m4=-(L/f2)*(25/f4)\n",
    "print \"Possible magnification of microscope with two short focal lengths : %0.2f\"%m4"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5 Page No: 834"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Angular magnification of the telescope : 83.33\n"
     ]
    }
   ],
   "source": [
    "d=8 #diameter of objective mirror of reflecting telescope in inches\n",
    "fo=1500 #focal length of objective mirror of reflecting telescope in mm\n",
    "fe=18 #focal length of eyepiece\n",
    "m=fo/fe\n",
    "print \"Angular magnification of the telescope : %0.2f\"%m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 6 Page No: 837"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a) Limiting angle of resolution in radians : 7.98e-07\n",
      "b) Maximum limit of resolution for the microscope in radians : 5.42e-07\n",
      "c) Limiting angle of resolution for the microscope when water filled the space b/w the object and objective in radians : 6.00e-07\n"
     ]
    }
   ],
   "source": [
    "l=589*10**-9 #Wavelength of sodium light m\n",
    "d=90*10**-2 #diameter of the aperture in m \n",
    "L=400*10**-9 #Wavelength of desirable Visble light\n",
    "n=1.33 #refractive index of water\n",
    "#a) Calculation of limiting angle of resolution\n",
    "#Limiting angle of resolution of the circular aperture is Theta_min=1.22*(l/d)\n",
    "Theta_min1=1.22*(l/d)\n",
    "print \"a) Limiting angle of resolution in radians : %0.2e\"%Theta_min1\n",
    "#b) Calculation of maximum limit of resolution for the microscope\n",
    "Theta_min2=1.22*(L/d)\n",
    "print \"b) Maximum limit of resolution for the microscope in radians : %0.2e\"%Theta_min2\n",
    "#c)Effect of water b/w the object and objective on resolving power of microscope\n",
    "lw=l/n\n",
    "Theta_min3=1.22*(lw/d)\n",
    "print \"c) Limiting angle of resolution for the microscope when water filled the space b/w the object and objective in radians : %0.2e\"%Theta_min3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7 Page No: 838"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnification of telescope A is : 166.67\n",
      "Magnification of telescope B is : 50.00\n"
     ]
    }
   ],
   "source": [
    "f1=1000# focal length of objective of telescope A in mm\n",
    "f2=1250# focal length of objective of telescope B in mm\n",
    "f3=6# focal length of eyepiece of telescope A in mm\n",
    "f4=25# focal length of eyepiece of telescope Bin mm\n",
    "#C) Calculation of magnification of the telescope\n",
    "m_A=f1/f3\n",
    "m_B=f2/f4\n",
    "print \"Magnification of telescope A is : %0.2f\"%m_A\n",
    "print \"Magnification of telescope B is : %0.2f\"%m_B"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8 Page No: 839"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a) Resolving poer of grating inorder to distinguish the wavelengths = 998.31\n",
      "b) No.of lines of the grating illuminated to resolve the lines in the second order spectrum are 499\n"
     ]
    }
   ],
   "source": [
    "L1=589 # wavelength of first bright line in sodium spectrum in nm\n",
    "L2=589.59 # wavelength of second bright line in sodium spectrum in nm\n",
    "m=2 # order of the spectrum\n",
    "delta_L=L2-L1\n",
    "R=L1/delta_L\n",
    "print \"a) Resolving poer of grating inorder to distinguish the wavelengths = %0.2f\"% R\n",
    "N=R/m\n",
    "print \"b) No.of lines of the grating illuminated to resolve the lines in the second order spectrum are %d\"%N"
   ]
  }
 ],
 "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
}
