Skip to content
forked from samb8s/PsrPopPy

Python implementation of PSRPOP, designed to be run from the command line or from Python scripts/interpreter

Notifications You must be signed in to change notification settings

swiggumj/PsrPopPy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PsrPopPy

(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 requirement is matplotlib, which is used for the visualization stuff. It has a very useful API for making simple GUIs, as well as making beautiful plots.

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.

dosurvey

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

view.py

Program for making quick histograms of population model

wxView.py

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

About

Python implementation of PSRPOP, designed to be run from the command line or from Python scripts/interpreter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Fortran 53.9%
  • Python 32.0%
  • JavaScript 13.0%
  • Other 1.1%