py4sci

Table Of Contents

Previous topic

Installation

Next topic

Tutorial - Basic Usage

This Page

Command-line scripts

populate.py

-n <number of pulsars>

Required: Number of pulsars to generate; or to detect in a survey

-o <output>

Output file name for population model (def=populate.model)

-surveys <SURVEY NAME(S)>

List of surveys to use when trying to detect pulsars (default=None)

-z <scale height>

Scale height of pulsars about Galactic plane, in kpc (default=0.33)

-w <width>

Pulse width to use when generating pulsars (default=0, use beaming model)

-si <SImean SIsigma>

Spectral index mean and standard deviation (default=-1.6, 0.35)

-sc <scatter index>

Spectral index of scattering law to use (default=-3.86, Bhat et al model)

-pdist <distribution name>

Distribution type for pulse periods (default=lnorm)

Supported: ‘lnorm’, ‘norm’, ‘cc97’

-p <mean stddev>

Mean and standard deviation to use in period dist ‘lnorm’ or ‘norm’ (def=-2.7, 0.34)

-rdist <radial model>

Model to use for Galactic radial distribution of pulsars

Supported: ‘lfl06’, ‘yk04’, ‘isotropic’, ‘slab’, ‘disk’

-dm <Electron model>

Model to describe the Galactic electron distribution

Supported: ‘ne2001’, ‘lm98’

-gps <fraction 'a'>

Add <fraction> pulsars with GHz-frequency turnovers with index a

-doublespec <fraction alpha1>

Add <fraction> pulsars with low-frequency (below 1GHz) spectral index of alpha1

--nostdout

Turn off writing to stdout. Useful for many iterations eg. in large simulations

dosurvey.py

-f <filename>

Input population model to use (default=populate.model)

-surveys <SURVEY NAME(S)>

Required: Name(s) of surveys to simulate on the population model

--noresults

By default, a .results file is written, containing a model of the population detected in the survey. This option switches off the writing of this file.

--asc

Write the survey model in plain ascii (psrpop old style). Not recommended, since the cPickle ‘.results’ file is easier to work with.

--summary

Write a short .summary file (per survey) describing number of detections, number of pulsars outside survey area, number smeared, and number not beaming

--nostdout

Turn off writing to stdout. Useful for many iterations eg. in large simulations

view.py

-f <input model>

Select the population model to view (default=populate.model)

-p <param name>

Select the population parameter to plot

Supported: ‘period’, ‘dm’, ‘gl’, ‘gb’, ‘lum’, ‘alpha’, ‘r0’, ‘rho’, ‘width’, ‘spindex’, ‘scindex’, ‘dist’

--logx

Plot log10 of the values

visualize.py

-f <model>

Select a population model to plot (default = populate.model)

-frac <F>

Plot a fraction <F> of the population for speed gains