{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 17: Antenna Temperature, Remote Sensing and Radar Cross Section<h1>"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-1.1, Page number: 623<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi\n",
      "\n",
      "#Variable declaration\n",
      "Ta = 0.24   #Antenna temperature (K)\n",
      "ang = 0.005     #Subtended angle (degrees)\n",
      "hpbw = 0.116    #Antenna half power beamwidth (degrees)\n",
      "\n",
      "#Calculations\n",
      "Ts = Ta*(hpbw**2)/(pi*(ang**2/4))\n",
      "\n",
      "#Result\n",
      "print \"The averate temperature of the surface is\", round(Ts), \"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The averate temperature of the surface is 164.0 K\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-1.2, Page number: 625<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi, sqrt\n",
      "\n",
      "#Variable declaration\n",
      "eff_aper = 500      #Antenna effective aperture (m^2)\n",
      "wave_lt = 20e-2        #Wavelength (m)\n",
      "Tsky = 10.0           #sky temperature (K)\n",
      "Tgnd = 300.0          #Ground temperature (K)\n",
      "beam_eff = 0.7      #Beam efficiency (unitless)\n",
      "aper_eff = 0.5      #Aperture efficiency (unitless)\n",
      "\n",
      "#Calculations\n",
      "phy_aper = aper_eff/eff_aper    #Physical aperture (m^2)\n",
      "diam = 2*sqrt(phy_aper/pi)  #Antenna diameter (m)\n",
      "diam_l = diam/wave_lt       #Antenna diameter (lambda)\n",
      "\n",
      "ta_sky = Tsky*beam_eff      #Sky contribution to antenna temp. (K)\n",
      "ta_side = 0.5*Tsky*(1-beam_eff) #Side-lobe contribution to antenna temp. (K)\n",
      "ta_back = 0.5*Tgnd*(1-beam_eff) #Back-lobe contribution to antenna temp. (K)\n",
      "\n",
      "Ta = ta_sky + ta_side + ta_back\n",
      "\n",
      "#Result\n",
      "print \"The total antenna temperature is\", Ta, \"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total antenna temperature is 53.5 K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-2.1, Page number: 629<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Tn = 50.0     #Noise temperature (K)\n",
      "Tphy = 300.0      #Physical temperature (K)\n",
      "Eff = 0.99       #Efficiency (unitless)\n",
      "Tn_stg = 80.0       #Noise temperature of first 3 stages (K)\n",
      "gain_db = 13.0       #Gain (dB)\n",
      "Tphy_tr = 300   #Transmission line physical temperature (K)\n",
      "Eff_tr = 0.9    #Transmission line efficiency (unitless)\n",
      "\n",
      "#Calculations\n",
      "gain = 10**(gain_db/10)\n",
      "T_r = Tn_stg + Tn_stg/(gain) + Tn_stg/(gain**2)\n",
      "                #Receiver noise temperature (K)\n",
      "Tsys = Tn + Tphy*(1/Eff - 1) + Tphy_tr*(1/Eff_tr - 1) + (1/Eff_tr)*T_r\n",
      "                #System temperature (K)\n",
      "\n",
      "#Result\n",
      "print \"The system temperature is\", round(Tsys), \"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The system temperature is 180.0 K\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-2.2, Page number: 630<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "\n",
      "#Variable declaration\n",
      "phy_aper = 2208     #Physical aperture (m^2)\n",
      "f = 1415e6          #Frequency (Hz)\n",
      "aper_eff = 0.54     #Aperture efficiency (unitless)\n",
      "Tsys = 50           #System temperature (K)\n",
      "bw = 100e6          #RF Bandwidth (Hz)\n",
      "t_const = 10         #Output time constant (s)\n",
      "sys_const = 2.2     #System constant (unitless)\n",
      "k = 1.38e-23        #Boltzmann's constant (J/K)\n",
      "\n",
      "#Calculations\n",
      "Tmin = sys_const*Tsys/(sqrt(bw*t_const))    #Minimum detectable temperature(K)\n",
      "eff_aper = aper_eff*phy_aper        #Effective aperture (m^2)\n",
      "Smin = 2*k*Tmin/eff_aper        #Minimum detectable flux density (W/m^2/Hz)\n",
      "\n",
      "#Result\n",
      "print \"The minimum detectable flux density is %.1e W/m^2/Hz\" % Smin"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum detectable flux density is 8.1e-29 W/m^2/Hz\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-3.1, Page number: 631<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi, log10\n",
      "\n",
      "#Variable declaration\n",
      "k = 1.38e-23    #Boltzmann's constant (J/K)\n",
      "trans_pow = 5   #Transponder power (W)\n",
      "r = 36000e3     #Distance (m)\n",
      "wave_lt = 7.5e-2    #Wavelength (m)\n",
      "ant_gain = 30   #Antenna gain (dB)\n",
      "earth_ant = 38  #Earth station antenna gain (dB)\n",
      "Tsys = 100      #Earth station receiver system temperature (K)\n",
      "bw = 30e6       #Bandwidth (Hz)\n",
      "\n",
      "#Calculations\n",
      "s_n = wave_lt**2/(16*(pi**2)*(r**2)*k*Tsys*bw)\n",
      "s_n = 10*log10(s_n)     #Signal to Noise ratio (dB)\n",
      "\n",
      "trans_pow_db = 10*log10(trans_pow)  #Transponder power (dB)\n",
      "erp = ant_gain + trans_pow_db       #Effective radiated power (dB)\n",
      "\n",
      "s_n_downlink = erp + earth_ant + s_n    #Signal to Noise ratio downlink(dB)\n",
      "\n",
      "#Result\n",
      "print \"The earth station S/N ratio is\", round(s_n_downlink,1), \"dB\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The earth station S/N ratio is 13.2 dB\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-4.1, Page number: 634<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "\n",
      "#Variable declaration\n",
      "tf = 0.693      #Absorption co-efficient (unitless)\n",
      "Te = 305        #Earth temperature (K)\n",
      "Ta = 300        #Satellite antenna temperature (K)\n",
      "\n",
      "#Calculations\n",
      "Tf = (Ta - Te*exp(-tf))/(1-exp(-tf))\n",
      "\n",
      "#Result\n",
      "print \"The forest temperature is\", round(Tf), \"K\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The forest temperature is 295.0 K\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 17-5.1, Page number: 639<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "f = 10e9        #Frequency (Hz)\n",
      "wind_speed = 350    #Wind speed (km/h)\n",
      "c = 3e8         #Speed of light (m/s)\n",
      "vr = 1e3          #Differential velocity (m/h)\n",
      "\n",
      "#Calculations\n",
      "wave_lt = c/f   #Wavelength (m)\n",
      "freq_shift = 2*(wind_speed*1000/3600)/wave_lt   \n",
      "                    #Doppler Frequency shift (Hz)\n",
      "T = 1/(2*freq_shift)    #Pulse repetition interval (s)\n",
      "prf = 1/T           #Pulse repetition frequency (Hz)\n",
      "\n",
      "fmin = 2*(vr/3600)/wave_lt  #Frequency resolution (Hz)\n",
      "N = 1/(round(fmin,1)*T)      #Number of pulses \n",
      "\n",
      "#Result\n",
      "print \"The minimum pulse repetition frequency is\", round(prf,-3), \"Hz\"\n",
      "print \"The number of pulses to be sampled is\", round(N)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The minimum pulse repetition frequency is 13000.0 Hz\n",
        "The number of pulses to be sampled is 699.0\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}