Skip to content

KshitijAggarwal/PsrPopPy2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PsrPopPy2

2nd Version

Added rrat generation and detection part and much more!

To use single pulse snr use --singlepulse in populate and dosurvey. This will also generate a burst-rate based on a uniform distrubution. (eg. populate -n 1000 -pdist d_g -dgf corr_pops -ldist d_g -zdist d_g -rdist d_g -zdist d_g -brdist d_g -surveys PMSURV --singlepulse -dm ymw16 --dither)

Additions

  1. Can now draw samples from histograms for P, L, Z, R, and burst rate(eg. -pdist d_g -dgf <dist_file>. Generate dist_file using make_d_g.py)
  2. Single Pulse SNR and Burst Rate for Radio Transients (use --singlepulse in populate and dosurvey)
  3. wxHist and wxView now support burst rate and number of detected pulses for singlepulse case.
  4. ymw16 dm model now included
  5. Now dither the distnces using --dither option. See lorimer et al 2006 section 4.2.

Old Info

(For full documentation, see http://samb8s.github.com/PsrPopPy/ or manual.pdf)

Python implementation of PSRPOP (which was written by D Lorimer). Several of the old models from that (e.g. NE2001) are still included in their native fortran, since re-writing those is beyond the scope of this work. Currently, only a rudimentary makefile is included. This is something that needs work from a willing volunteer!

The main external requirements are matplotlib and wxPython, which are used for the visualization stuff. It has a very useful API for making simple GUIs, as well as making beautiful plots. I've had difficulty compiliing wxPython from scratch on more recent versions of Mac OS X, but it should be straightforward to install via macports or similar.

Dev Notes

I've just added scintillation effects to dosurvey! They can be switched on by adding the flag --scint, but are off by default. The code uses equations from Lorimer & Kramer and the NE2001 code to calculate modulation indices for pulsars in the population. The S/N of each pulsar is then scaled up or down using the modulation index.

Compiling

I've just incorporated a real makefile for the first time - be sure to edit makefile.linux or makefile.darwin as appropriate to point to the correct location of your gfortran compiler. After that, it should be as simple as typing make.

If this fails, try using the scripts. Inside the lib/fortran directory, edit make_mac.csh or make_linux.csh (as appropriate) -- change the variable `gf' to point to your local gfortran compiler, then run the script. Fingers crossed, it should all work.

Note mac users should be sure to use a suitable version of gfortran - available from http://gcc.gnu.org/wiki/GFortranBinaries

Usage

I'd recommend adding the lib/python directory to your PYTHONPATH and adding the bin directory to your PATH. This should then leave you set up to run the code from wherever you like.

A brief description of the "executables" follows.

populate

Create a population mode using user-defined parameters using the snapshot method

evolve

Create a populate model using the Ridley & Lorimer evolution method

dosurvey

Run a population model through a survey. Pre-defined surveys are given, but a user may also create their own.

wxView

More detailed population model viewer. Make histograms, scatter plots, etc. All based off the wx backend for matplotlib.

wxHist

Make more intricate histograms, including histograms of multiple population models.

About

Now populate and survey RRATs along with pulsars!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Fortran 48.0%
  • Python 38.0%
  • C 13.2%
  • C++ 0.3%
  • Shell 0.2%
  • Roff 0.1%
  • Other 0.2%