binary_c-python
For my research during my masters and PhD I’ve made us of the rapid (binary) stellar evolution code binary_c, to simulate (binary) star systems. The population-synthesis wrapper that enabled running many of these systems was written in Perl but I decided to rewrite this into a Python based code.
The code is well documented and automatically generated based on docstrings, and is available on Gitlab and Pypi. We provide tutorial and example notebooks on how to use the code technically, and how to actually calculate useful things with it on documentation page.
We have recently released version 1.0.0 for binary_c version 2.2.4. This version release contains many code-base changes and restructuring. I have implemented a (beta) version of Monte-Carlo based sampling, input validation for the population configuration, handlers for event-based logging (standard outputs for events like supernovae, Roche-lobe overflow, stellar mergers etc), a more formal logging structure and many more small features and bug fixes.
Moreover, along with this new version, the software-release paper has been published in the JOSS (Hendriks & Izzard, 2023).
## Usage
The installation instructions for binary_c-python are available here. To use binary_c-python you need to have binary_c installed (docs and git).
A very simple example of running a system is,
from binarycpython import run_system
res = run_system(M_1=10, M_2=5, orbital_period=200, log_filename='log.txt', event_based_logging_SN=1)
print(res.strip())
where run_system handles the call to binary_c which evolves a system with the properties we passed along. More complex examples are available through our tutorial and example notebooks.