

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Module-level Documentation &mdash; PsrPopPy 1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="PsrPopPy 1 documentation" href="index.html" />
    <link rel="prev" title="Tutorial - Basic Usage" href="tutorial-basic.html" /> 
  </head>
  <body>

<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<a href="index.html"><img src="_static/logo2.png" border="0" alt="py4sci"/></a>
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tutorial-basic.html" title="Tutorial - Basic Usage"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">home</a>|&nbsp;</li>
        <li><a href="search.html">search</a>|&nbsp;</li>
 
      </ul>
    </div>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Module-level Documentation</a><ul>
<li><a class="reference internal" href="#module-pulsar"><tt class="docutils literal"><span class="pre">pulsar</span></tt> &#8211; Creates/stores a pulsar object</a></li>
<li><a class="reference internal" href="#module-population"><tt class="docutils literal"><span class="pre">population</span></tt> &#8211; Creates/stores a population</a></li>
<li><a class="reference internal" href="#module-survey"><tt class="docutils literal"><span class="pre">survey</span></tt> &#8211; Read a survey file into a survey object</a></li>
<li><a class="reference internal" href="#module-populate"><tt class="docutils literal"><span class="pre">populate</span></tt> &#8211; Create a population object</a></li>
<li><a class="reference internal" href="#module-radialmodels"><tt class="docutils literal"><span class="pre">radialmodels</span></tt> &#8211; Container for radial distn models</a></li>
<li><a class="reference internal" href="#galacticops-container-for-functions-relating-to-the-galaxy"><tt class="docutils literal"><span class="pre">galacticops</span></tt> &#8211; Container for functions relating to the Galaxy</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="tutorial-basic.html"
                        title="previous chapter">Tutorial - Basic Usage</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/module-level-docs.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-level-documentation">
<span id="module-level-docs"></span><h1>Module-level Documentation<a class="headerlink" href="#module-level-documentation" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-pulsar">
<span id="pulsar-creates-stores-a-pulsar-object"></span><span id="pulsar-module-docs"></span><h2><a class="reference internal" href="pulsar_module_docs.html#module-pulsar" title="pulsar: The pulsar object"><tt class="xref py py-mod docutils literal"><span class="pre">pulsar</span></tt></a> &#8211; Creates/stores a pulsar object<a class="headerlink" href="#module-pulsar" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="pulsar.Pulsar">
<em class="property">class </em><tt class="descclassname">pulsar.</tt><tt class="descname">Pulsar</tt><a class="headerlink" href="#pulsar.Pulsar" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="pulsar.Pulsar.__init__">
<tt class="descclassname">Pulsar.</tt><tt class="descname">__init__</tt><big>(</big><span class="optional">[</span><em>period</em>, <em>dm</em>, <em>gl</em>, <em>gb</em>, <em>galCoords</em>, <em>r0</em>, <em>dtrue</em>, <em>lum_1400</em>, <em>spindex</em>, <em>alpha</em>, <em>rho</em>, <em>width_degree</em>, <em>snr</em>, <em>beaming</em>, <em>scindex</em>, <em>gpsFlag</em>, <em>gpsA</em>, <em>brokenFlag</em>, <em>brokenSI</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#pulsar.Pulsar.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialise the pulsar object</p>
</dd></dl>

<dl class="method">
<dt id="pulsar.Pulsar.s_1400">
<tt class="descclassname">Pulsar.</tt><tt class="descname">s_1400</tt><big>(</big><big>)</big><a class="headerlink" href="#pulsar.Pulsar.s_1400" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the flux at 1400 MHz, calculated as</p>
<p><img class="math" src="_images/math/69c7d980648258e40d6d2ae8be42060fb81b5892.png" alt="S_{\rm{1400}} = \frac{L_{\rm{1400}}}{D_{\rm{true}}^2}"/></p>
</dd></dl>

<dl class="method">
<dt id="pulsar.Pulsar.width_ms">
<tt class="descclassname">Pulsar.</tt><tt class="descname">width_ms</tt><big>(</big><big>)</big><a class="headerlink" href="#pulsar.Pulsar.width_ms" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the pulse width in milliseconds, calculated as</p>
<p><img class="math" src="_images/math/e2c09b8c01108c1bf02533891146ee774111eb3d.png" alt="W_{\rm{ms}} = P_{\rm{ms}} \times W_{\rm{degree}} / 360"/></p>
</dd></dl>

</div>
<div class="section" id="module-population">
<span id="population-creates-stores-a-population"></span><span id="population-module-docs"></span><h2><a class="reference internal" href="#module-population" title="population: The population object"><tt class="xref py py-mod docutils literal"><span class="pre">population</span></tt></a> &#8211; Creates/stores a population<a class="headerlink" href="#module-population" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="population.Population">
<em class="property">class </em><tt class="descclassname">population.</tt><tt class="descname">Population</tt><a class="headerlink" href="#population.Population" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="population.Population.__init__">
<tt class="descclassname">Population.</tt><tt class="descname">__init__</tt><big>(</big><span class="optional">[</span><em>pDistType</em>, <em>radialDistType</em>, <em>lumDistType</em>, <em>pmean</em>, <em>psigma</em>, <em>simean</em>, <em>sisigma</em>, <em>lummean</em>, <em>lumsigma</em>, <em>zscale</em>, <em>electronModel</em>, <em>gpsFrac</em>, <em>gpsA</em>, <em>brokenFrac</em>, <em>brokenSI</em>, <em>ref_freq</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#population.Population.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialise the population object</p>
</dd></dl>

<dl class="method">
<dt id="population.Population.__str__">
<tt class="descclassname">Population.</tt><tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#population.Population.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>Defines how the operation <tt class="docutils literal"><span class="pre">print</span> <span class="pre">Population</span></tt> is performed</p>
</dd></dl>

<dl class="method">
<dt id="population.Population.size">
<tt class="descclassname">Population.</tt><tt class="descname">size</tt><big>(</big><big>)</big><a class="headerlink" href="#population.Population.size" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of pulsars in the population object</p>
</dd></dl>

<dl class="method">
<dt id="population.Population.join">
<tt class="descclassname">Population.</tt><tt class="descname">join</tt><big>(</big><em>poplist</em><big>)</big><a class="headerlink" href="#population.Population.join" title="Permalink to this definition">¶</a></dt>
<dd><p>Joins each of the populations in list <tt class="docutils literal"><span class="pre">poplist</span></tt> to the current population</p>
</dd></dl>

<dl class="method">
<dt id="population.Population.write">
<tt class="descclassname">Population.</tt><tt class="descname">write</tt><big>(</big><em>outf</em><big>)</big><a class="headerlink" href="#population.Population.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses cPickle to dump the population to file <tt class="docutils literal"><span class="pre">outf</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="population.Population.write_asc">
<tt class="descclassname">Population.</tt><tt class="descname">write_asc</tt><big>(</big><em>outf</em><big>)</big><a class="headerlink" href="#population.Population.write_asc" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes the population to an ascii file in the old psrpop way</p>
</dd></dl>

</div>
<div class="section" id="module-survey">
<span id="survey-read-a-survey-file-into-a-survey-object"></span><span id="survey-module-docs"></span><h2><a class="reference internal" href="#module-survey" title="survey: Store survey information"><tt class="xref py py-mod docutils literal"><span class="pre">survey</span></tt></a> &#8211; Read a survey file into a survey object<a class="headerlink" href="#module-survey" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="survey.Survey">
<em class="property">class </em><tt class="descclassname">survey.</tt><tt class="descname">Survey</tt><a class="headerlink" href="#survey.Survey" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="survey.Survey.__init__">
<tt class="descclassname">Survey.</tt><tt class="descname">__init__</tt><big>(</big><em>surveyName</em><big>)</big><a class="headerlink" href="#survey.Survey.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Read in a (correctly formatted!) survey file</p>
</dd></dl>

<dl class="method">
<dt id="survey.Survey.__str__">
<tt class="descclassname">Survey.</tt><tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#survey.Survey.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>Define how to perform <tt class="docutils literal"><span class="pre">print</span> <span class="pre">Survey</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="survey.Survey.nchans">
<tt class="descclassname">Survey.</tt><tt class="descname">nchans</tt><big>(</big><big>)</big><a class="headerlink" href="#survey.Survey.nchans" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of channels, calculated as</p>
<p><img class="math" src="_images/math/bba300285ef9f5814e3303f1ec1aecf0f00fdd86.png" alt="n_{\rm{chans}} = \frac{ {\rm{BW}}_{\rm{total}} }{ {\rm{BM}}_{\rm{chan}} }"/></p>
</dd></dl>

<dl class="method">
<dt id="survey.Survey.inRegion">
<tt class="descclassname">Survey.</tt><tt class="descname">inRegion</tt><big>(</big><em>pulsar</em><big>)</big><a class="headerlink" href="#survey.Survey.inRegion" title="Permalink to this definition">¶</a></dt>
<dd><p>Determines if <a class="reference internal" href="pulsar_module_docs.html#pulsar.Pulsar" title="pulsar.Pulsar"><tt class="xref py py-class docutils literal"><span class="pre">Pulsar</span></tt></a> is inside survey region. Returns True or False accordingly</p>
</dd></dl>

<dl class="method">
<dt id="survey.Survey.inPointing">
<tt class="descclassname">Survey.</tt><tt class="descname">inPointing</tt><big>(</big><em>pulsar</em><big>)</big><a class="headerlink" href="#survey.Survey.inPointing" title="Permalink to this definition">¶</a></dt>
<dd><p>Determines if <a class="reference internal" href="pulsar_module_docs.html#pulsar.Pulsar" title="pulsar.Pulsar"><tt class="xref py py-class docutils literal"><span class="pre">Pulsar</span></tt></a> is inside one of the survey&#8217;s <a class="reference internal" href="#survey.Pointing" title="survey.Pointing"><tt class="xref py py-class docutils literal"><span class="pre">pointings</span></tt></a>. Returns the offset from beam centre to the pulsar.</p>
</dd></dl>

<dl class="method">
<dt id="survey.Survey.SNRcalc">
<tt class="descclassname">Survey.</tt><tt class="descname">SNRcalc</tt><big>(</big><em>pulsar</em>, <em>pop</em><big>)</big><a class="headerlink" href="#survey.Survey.SNRcalc" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the SNR of a <a class="reference internal" href="pulsar_module_docs.html#pulsar.Pulsar" title="pulsar.Pulsar"><tt class="xref py py-class docutils literal"><span class="pre">Pulsar</span></tt></a> from <a class="reference internal" href="#population.Population" title="population.Population"><tt class="xref py py-class docutils literal"><span class="pre">Population</span></tt></a> <tt class="docutils literal"><span class="pre">pop</span></tt> in the survey. Returns -1 if pulse is smeared, and -2 if pulsar is outside survey region. SNR is calculated (with familiar terms) as</p>
<p><img class="math" src="_images/math/ed890be379149850eb2d46dbb71470913982a87b.png" alt="{\rm{SNR}} = \frac{S_{1400} G \sqrt{n_{\rm{pol}} BW \tau}}{\beta T_{\rm{tot}}} \sqrt{\frac{1-\delta}{\delta}} \eta"/></p>
<p>where</p>
<p><img class="math" src="_images/math/81ce525eadf8eaf2407a3411ffff35507598dafe.png" alt="\eta = \exp(-2.7727 \times {\rm{offset}}^2 / {\rm{fwhm}}^2)"/></p>
</dd></dl>

<dl class="class">
<dt id="survey.Pointing">
<em class="property">class </em><tt class="descclassname">survey.</tt><tt class="descname">Pointing</tt><a class="headerlink" href="#survey.Pointing" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="survey.Pointing.__init__">
<tt class="descclassname">Pointing.</tt><tt class="descname">__init__</tt><big>(</big><em>coord1</em>, <em>coord2</em>, <em>coordtype</em><big>)</big><a class="headerlink" href="#survey.Pointing.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts (coord1, coord2) into correctly formatted (l, b). Coordtype must be
either <tt class="docutils literal"><span class="pre">eq</span></tt> or <tt class="docutils literal"><span class="pre">gal</span></tt>. If <tt class="docutils literal"><span class="pre">eq</span></tt>, the RA and Dec are converted internally</p>
</dd></dl>

</div>
<div class="section" id="module-populate">
<span id="populate-create-a-population-object"></span><span id="populate-module-docs"></span><h2><a class="reference internal" href="#module-populate" title="populate: Create a population object"><tt class="xref py py-mod docutils literal"><span class="pre">populate</span></tt></a> &#8211; Create a population object<a class="headerlink" href="#module-populate" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="populate.Populate">
<em class="property">class </em><tt class="descclassname">populate.</tt><tt class="descname">Populate</tt><a class="headerlink" href="#populate.Populate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="populate.Populate.generate">
<tt class="descclassname">Populate.</tt><tt class="descname">generate</tt><big>(</big><em>ngen</em><span class="optional">[</span>, <em>surveyList</em>, <em>pDistType</em>, <em>radialDistType</em>, <em>electronModel</em>, <em>pDistPars</em>, <em>siDistPars</em>, <em>lumDistType</em>, <em>lumDistPars</em>, <em>zscale</em>, <em>duty</em>, <em>scindex</em>, <em>gpsArgs</em>, <em>doubleSpec</em>, <em>nostdout</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#populate.Populate.generate" title="Permalink to this definition">¶</a></dt>
<dd><p>The method called by the <tt class="docutils literal"><span class="pre">populate.py</span></tt> command-line-script</p>
</dd></dl>

<dl class="method">
<dt id="populate.Populate.write">
<tt class="descclassname">Populate.</tt><tt class="descname">write</tt><big>(</big><em>outf=populate.model</em><big>)</big><a class="headerlink" href="#populate.Populate.write" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes the <a class="reference internal" href="#population.Population" title="population.Population"><tt class="xref py py-class docutils literal"><span class="pre">Population</span></tt></a> model into file outf as a cPickle dump</p>
</dd></dl>

</div>
<div class="section" id="module-radialmodels">
<span id="radialmodels-container-for-radial-distn-models"></span><span id="radialmodels-module-docs"></span><h2><a class="reference internal" href="#module-radialmodels" title="radialmodels: Container for radial distn models"><tt class="xref py py-mod docutils literal"><span class="pre">radialmodels</span></tt></a> &#8211; Container for radial distn models<a class="headerlink" href="#module-radialmodels" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="radialmodels.RadialModels">
<em class="property">class </em><tt class="descclassname">radialmodels.</tt><tt class="descname">RadialModels</tt><a class="headerlink" href="#radialmodels.RadialModels" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="radialmodels.seed">
<tt class="descclassname">radialmodels.</tt><tt class="descname">seed</tt><big>(</big><big>)</big><a class="headerlink" href="#radialmodels.seed" title="Permalink to this definition">¶</a></dt>
<dd><p>Call the FORTRAN routine to make a seed</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.slabdist">
<tt class="descclassname">radialmodels.</tt><tt class="descname">slabdist</tt><big>(</big><big>)</big><a class="headerlink" href="#radialmodels.slabdist" title="Permalink to this definition">¶</a></dt>
<dd><p>Pick a point from a &#8220;slab&#8221; distribution around the Galactic plane</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.diskdist">
<tt class="descclassname">radialmodels.</tt><tt class="descname">diskdist</tt><big>(</big><big>)</big><a class="headerlink" href="#radialmodels.diskdist" title="Permalink to this definition">¶</a></dt>
<dd><p>Pick a point from a distribution purely along the Galactic plane</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.lfl06">
<tt class="descclassname">radialmodels.</tt><tt class="descname">lfl06</tt><big>(</big><big>)</big><a class="headerlink" href="#radialmodels.lfl06" title="Permalink to this definition">¶</a></dt>
<dd><p>Pick a point from the Lorimer et al (2006) Galactic distribution</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.ykr">
<tt class="descclassname">radialmodels.</tt><tt class="descname">ykr</tt><big>(</big><big>)</big><a class="headerlink" href="#radialmodels.ykr" title="Permalink to this definition">¶</a></dt>
<dd><p>Pick a point from the Yusifov &amp; Kucuk Galactic distribution</p>
</dd></dl>

</div>
<div class="section" id="galacticops-container-for-functions-relating-to-the-galaxy">
<span id="galacticops-module-docs"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">galacticops</span></tt> &#8211; Container for functions relating to the Galaxy<a class="headerlink" href="#galacticops-container-for-functions-relating-to-the-galaxy" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="radialmodels.GalacticOps">
<em class="property">class </em><tt class="descclassname">radialmodels.</tt><tt class="descname">GalacticOps</tt><a class="headerlink" href="#radialmodels.GalacticOps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="radialmodels.calc_dtrue">
<tt class="descclassname">radialmodels.</tt><tt class="descname">calc_dtrue</tt><big>(</big><em>(x</em>, <em>y</em>, <em>z)</em><big>)</big><a class="headerlink" href="#radialmodels.calc_dtrue" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the distance from the Sun to Galactic coords (x, y, z) (NB. tuple)</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.calcXY">
<tt class="descclassname">radialmodels.</tt><tt class="descname">calcXY</tt><big>(</big><em>r0</em><big>)</big><a class="headerlink" href="#radialmodels.calcXY" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a Galactic radius r0, choose an (x, y) position at random <img class="math" src="_images/math/52e8ed7a3ba22130ad3984eb2cd413406475a689.png" alt="\theta"/></p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.ne2001_dist_to_dm">
<tt class="descclassname">radialmodels.</tt><tt class="descname">ne2001_dist_to_dm</tt><big>(</big><em>dist</em>, <em>gl</em>, <em>gb</em><big>)</big><a class="headerlink" href="#radialmodels.ne2001_dist_to_dm" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a distance and Galactic coordinates, calculate DM according to NE2001</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.lm98_dist_to_dm">
<tt class="descclassname">radialmodels.</tt><tt class="descname">lm98_dist_to_dm</tt><big>(</big><em>dist</em>, <em>gl</em>, <em>gb</em><big>)</big><a class="headerlink" href="#radialmodels.lm98_dist_to_dm" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a distance and Galactic coordinates, calculate DM according to lm98</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.lb_to_radec">
<tt class="descclassname">radialmodels.</tt><tt class="descname">lb_to_radec</tt><big>(</big><em>gl</em>, <em>gb</em><big>)</big><a class="headerlink" href="#radialmodels.lb_to_radec" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert Galactic coordinates to equatorial</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.ra_dec_to_lb">
<tt class="descclassname">radialmodels.</tt><tt class="descname">ra_dec_to_lb</tt><big>(</big><em>ra</em>, <em>dec</em><big>)</big><a class="headerlink" href="#radialmodels.ra_dec_to_lb" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert equatorial coordinates to Galactic</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.tsky">
<tt class="descclassname">radialmodels.</tt><tt class="descname">tsky</tt><big>(</big><em>gl</em>, <em>gb</em>, <em>freq</em><big>)</big><a class="headerlink" href="#radialmodels.tsky" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate sky temperature at observing frequency freq and at Galactic coordinates gl, gb according to Haslam et al</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.xyz_to_lb">
<tt class="descclassname">radialmodels.</tt><tt class="descname">xyz_to_lb</tt><big>(</big><em>(x</em>, <em>y</em>, <em>z)</em><big>)</big><a class="headerlink" href="#radialmodels.xyz_to_lb" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the tuple (x, y, z) to Galactic sky coordinates.</p>
<p>Returns l, b in degrees</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.lb_to_xyz">
<tt class="descclassname">radialmodels.</tt><tt class="descname">lb_to_xyz</tt><big>(</big><em>l</em>, <em>b</em>, <em>dist</em><big>)</big><a class="headerlink" href="#radialmodels.lb_to_xyz" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert Galactic sky coordinates at a distance dist to x,y,z coordinates.</p>
<p>Returns position as a tuple</p>
</dd></dl>

<dl class="method">
<dt id="radialmodels.scatter_bhat">
<tt class="descclassname">radialmodels.</tt><tt class="descname">scatter_bhat</tt><big>(</big><em>dm</em>, <em>scatterindex</em>, <em>freq_mhz</em><big>)</big><a class="headerlink" href="#radialmodels.scatter_bhat" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the scatter time according to Bhat et al at. Frequency in MHz, pulsar with dispersion measure dm, and using a scattering spectral index of scatterindex.</p>
<p>Calculated as</p>
<p><img class="math" src="_images/math/1446ea9b0a17ab5412383ef7be45bc4a388b6dee.png" alt="\tau = -6.46 + 0.154 \log_{10}({\rm{dm}}) + 1.07\log_{10}({\rm{dm}})^2 + {\rm{scatterindex}} \times \log_{10}(\frac{\rm{freq\_mhz}}{1000})"/></p>
<p>and typically <img class="math" src="_images/math/1ac72c2e8ea042e69e1f8e71b0eff14c4c5f4741.png" alt="{\rm{scatterindex}} = -3.86"/> (but there is an option to vary it!)</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tutorial-basic.html" title="Tutorial - Basic Usage"
             >previous</a> |</li>
        <li><a href="index.html">home</a>|&nbsp;</li>
        <li><a href="search.html">search</a>|&nbsp;</li>
 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, S Bates.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>