Initialise the pulsar object
Returns the flux at 1400 MHz, calculated as

Returns the pulse width in milliseconds, calculated as

Initialise the population object
Defines how the operation print Population is performed
Returns the number of pulsars in the population object
Joins each of the populations in list poplist to the current population
Uses cPickle to dump the population to file outf
Writes the population to an ascii file in the old psrpop way
Read in a (correctly formatted!) survey file
Define how to perform print Survey
Returns the number of channels, calculated as

Determines if Pulsar is inside survey region. Returns True or False accordingly
Determines if Pulsar is inside one of the survey’s pointings. Returns the offset from beam centre to the pulsar.
Calculates the SNR of a Pulsar from Population pop in the survey. Returns -1 if pulse is smeared, and -2 if pulsar is outside survey region. SNR is calculated (with familiar terms) as

where

Converts (coord1, coord2) into correctly formatted (l, b). Coordtype must be either eq or gal. If eq, the RA and Dec are converted internally
The method called by the populate.py command-line-script
Writes the Population model into file outf as a cPickle dump
Call the FORTRAN routine to make a seed
Pick a point from a “slab” distribution around the Galactic plane
Pick a point from a distribution purely along the Galactic plane
Pick a point from the Lorimer et al (2006) Galactic distribution
Pick a point from the Yusifov & Kucuk Galactic distribution
Calculate the distance from the Sun to Galactic coords (x, y, z) (NB. tuple)
Given a Galactic radius r0, choose an (x, y) position at random 
Given a distance and Galactic coordinates, calculate DM according to NE2001
Given a distance and Galactic coordinates, calculate DM according to lm98
Convert Galactic coordinates to equatorial
Convert equatorial coordinates to Galactic
Calculate sky temperature at observing frequency freq and at Galactic coordinates gl, gb according to Haslam et al
Convert the tuple (x, y, z) to Galactic sky coordinates.
Returns l, b in degrees
Convert Galactic sky coordinates at a distance dist to x,y,z coordinates.
Returns position as a tuple
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.
Calculated as

and typically
(but there is an option to vary it!)