Bayesian Analysis of Neutron Star Mass and Radius Observations
This document describes the open source MPI implementation of a Bayesian analysis of mass and radius data to determine the mass versus radius curve and the equation of state of dense matter. This package will principally be useful for those physicists and astrophysicists who are already familiar with C++ and are interested in modifying this code for their own use.
This implementation was originally supported by Chandra grant TM1-12003X.
This is a very early release, a beta version. Use at your own risk.
If you are considering using this code for your research, I encourage you to contact me so that I can help you with the details and so that you can let me know if and how this code is useful to you. Nevertheless, you are not required to contact me and I will try to continue to improve the documentation and update this code as time permits.
The bamr executable requires the installation of GSL (versions 1.15 and later), HDF5 (versions 1.8.4 and later),
O2scl (version 0.913 only),
and MPI (tested with openmpi-1.4.2). After these four packages are successfully installed, you will need to edit the
makefile and then compile bamr before execution.
The most recent .tar.gz file can be obtained from http://sourceforge.net/projects/bamr/files/latest/download or you may check out the most recent release version from the SVN repository using
svn checkout svn://svn.code.sf.net/p/bamr/code/trunk bamr
The basic usage is something like
./bamr -model twop -set in_file default.in -mcmc run1
to make a one day run with model
twop with the input file in
There are several variables which can be modified with the
set command, e.g.
./bamr -model twop -set max_time 43200 -set in_file default.in -mcmc run2
An example of an MPI invocation is
mpirun -np 4 ./bamr -set model twop -set in_file default.in -mcmc run3 &
which runs with four processors on the current machine.
which outputs some additional information on the relevant functions and parameters.
There are two kinds of input files, the first is a text file which specifies the initial values of all of the parameters. The second is a set of HDF5 files (typically named with a
.o2 extension) which contain one table3d object giving the probability density of a neutron star observation as a slice in that table.
The input text file must contains the following lines
The input line for each source should contain the following columns
Output is stored in HDF files with a prefix given by the argument to the
mcmc command, one set of files for each processor. Output includes files with the following suffixes (where X is the processor index):
_X_best:"Best" point found during run
_X_out:Ensemble of histograms of EOS relative to SLy4
_X_scr:Running output of entire simulation
If the executable is run directly (without
mpirun) then X is always zero.
If the initial guess has no probability, then the code will fail. This is indicated by the line
"Initial weight zero." in the
_scr file. The easiest fix is just to change the initial guess.
Some EOS models are already provided. New models (i.e. new children of the model class) must include a minimal functionality. The function model::compute_eos() should use the parameters in the entry argument to compute the EOS and store it into the object returned by cold_nstar::get_eos_results(). The energy density should be stored in a column named
ed and the pressure in
pr. If the baryon density is provided, model::compute_eos() should store one baryon density and energy density in model::nb_n1 and model::nb_e1, respectively. If the model provides the symmetry energy, it should be stored as constants named
"L" in the table. Causality is automatically checked in bamr::compute_star(), but the model::compute_eos() function should check that the pressure is not decreasing. Finally, it is recommended to set the interpolation type in the table_units object to linear interpolation.
Plotting requires the installation of ROOT, but only requires the most basic functionality of ROOT so all of the extra packages which are available can be disabled. The relevant
makefile targets are
I would like to thank Ed Brown, Stefano Gandolfi, and Jim Lattimer for their collaboration on these projects.
Some of the references which contain links should direct you to the work referred to using its DOI identifer.
Lattimer13: J.M. Lattimer and A.W. Steiner, Astrophys. J., submitted (2013).
Steiner10: A.W. Steiner, J.M. Lattimer, E.F. Brown, Astrophys. J. 722 (2010) 33.
Steiner12: A.W. Steiner and S. Gandolfi, Phys. Rev. Lett. 108 (2012) 081102.
Steiner13: A.W. Steiner, J.M. Lattimer, E.F. Brown, Astrophys. J. Lett. 765 (2013) 5.
Documentation generated with Doxygen. Bamr documentation is under the GNU Free Documentation License.