Python module for binary_c
We present our package binary-c-python, a population synthesis code which is aimed to provide a convenient and easy-to-use interface to the binary_c framework, allowing the user to rapidly evolve single stellar systems and populations of star systems. Based on a early work by Jeff Andrews. Updated and extended for Python3 by David Hendriks, Robert Izzard.
binary_c-python is developed for students and scientists in the field of stellar astrophysics, who want to study the evolution of individual or populations of single and binary star systems (see the example use-case notebooks in the online documentation.
The current release is version version, and is designed and tested to work with binary_c version 2.2.1 (for older or newer versions we can't guarantee correct behaviour).
The current development branch is development_0.9.5/2.2.2
.
Installation
To install binary_c-python we need to make sure we meet the requirements of installation, and
Python requirements
To run this code you need to at least have installations of:
- Python 3.7 or higher (3.6 is EOL, and we are using 3.9 for development)
- binary_c version 2.2.0 or higher
The packages that are required for this code to run are listed in the requirements.txt, which automatically gets read out by setup.py
Environment variables
Before compilation you need to have certain environment variables:
Required:
-
BINARY_C
should point to the root directory of your binary_c installation -
LD_LIBRARY_PATH
should include $BINARY_C/src and whatever directories are required to run binary_c (e.g. locations of libgsl, libmemoize, librinterpolate, etc.) -
LIBRARY_PATH
should include whatever directories are required to build binary_c (e.g. locations of libgsl, libmemoize, librinterpolate, etc.) -
GSL_DIR
should point to the root location where you installed GSL to. This root dir should containbin/
,lib/
etc
Build instructions
First, make sure you have built binary_c (See $BINARY_C/doc/binary_c2.pdf
section: installation for all the installation instructions for binary_c
)) and that it functions correctly.
Installation via PIP:
To install this package via pip: