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 beta version. Use at your own risk.
Currently, bamr is dual-hosted as an SVN respostory at http://www.sourceforge.net/projects/bamr and a git repository at http://www.github.com/awsteiner/bamr . This HTML documentation is hosted at http://bamr.sourceforge.net.
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 be improving documentation and updating 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),
the current development version of
O2scl (in the
branches/dev folder of the
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 release version can be obtained from either of the following:
svn checkout svn://svn.code.sf.net/p/bamr/code/trunk bamr git clone https://github.com/awsteiner/bamr.git
The basic usage is something like
mpirun -np 4 ./bamr -model twop -run default.in -mcmc run1
to perform 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 -run default.in -mcmc run2
An example of an MPI invocation is
mpirun -np 4 ./bamr -set model twop -run default.in -mcmc run3 &
which runs with four processors on the current machine.
which outputs some additional information on the relevant functions and parameters.
The data files are HDF5 files (typically named with a
.o2 extension) which contain one o2scl::table3d object giving the probability density of a neutron star observation as a slice in that table.
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_out:Main output file containing full Markov chain and most of the parameter values
_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.
In order to make the output more efficient, the table representing the full Markov chain is divided up into tables with about 10,000 rows each. The total number of tables is stored in
Some EOS models are already provided. New models (i.e. new children of the bamr::model class) must perform several tasks
edand the pressure in
prwith the correct units set for each column (currently only
"nb", then bamr::model::compute_eos() should return one baryon density and energy density in bamr::model::baryon_density_point().
"L"in the table (in ).
The top-level functions in the call stack are:
The operation of bamr::bamr_class::compute_weight() can be summarized with:
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.
Lattimer14b: J.M. Lattimer and A.W. Steiner, Astrophys. J. 784 (2014) 123.
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.