Package: holodeck-gw
holodeckMassive Black-Hole Binary Population Synthesis for Gravitational Wave Calculations ≋●≋●≋This package is aimed at providing a comprehensive framework for MBH binary population synthesis.  The framework includes modules to perform pop synth using a variety of methodologies to get a handle on both statistical and systematic uncertainties.  Currently, binary populations can be synthesis based on: cosmological hydrodynamic simulations (Illustris), semi-analytic/semi-empirical models (SAMs), and observational catalogs of local galaxies and/or quasars.InstallationTheholodeckframework is currently under substantial, active development.  It will not be available onpypi(pip) or viacondainstall until it has stabilized.  Currentlyholodeckrequirespython >= 3.9, and tests are run on versions3.9,3.10,3.11.The recommended installation for active development is to:OPTIONAL: create and activate a new anaconda environment to isolate your build:conda create --name holo310 python=3.10; conda activate holo310Clone the holodeck repository:git clone https://github.com/nanograv/holodeck.gitInstall the required external packages specified in the requirements file:pip install -r requirements.txt.  OPTIONAL: install development requirements:pip install -r requirements-dev.txtBuild the required c libraries from holodeck cython code:cd holodeck; python setup.py build_ext -iPerform an development/editable local installation:python setup.py developThe 'editable' installation allows the code base to be modified, and have those changes take effect when using theholodeckmodule without having to rebuild/reinstall it.MPIFor some scripts (particularly for generating libraries), an MPI implementation is required (e.g.openmpi), along with thempi4pypackage.  This is not included as a requirement in therequirements.txtfile as it significantly increases the installation complexity, and is not needed for manyholodeckuse cases.  If you need the additional functionality, try installingmpi4pyand if needed an MPI implementation.To see if you havempi4pyinstalled, runpython -c 'import mpi4py; print(mpi4py.__version__)'from a terminal.macosIf you are using homebrew on macos, you should be able to simply run:brew install mpi4pywhich willinclude the required openmpi implementation.  If you already have an MPI implementation installed, and you are using anaconda, you should be able to install thempy4pypython package with:conda install mpi4py.QuickstartThe best way to get started is using the demonstration/testing notebooks included in thenotebooks/directory.DocumentationThe primary sources of documentation forholodeckare thisREADME.mdfile, the notebooks included in thenotebooks/directory, and docstrings included in the source code directly.readthedocsdocumentationare being written and improved, and a methods paper is in preparation.ContributingThis project is being led by theNANOGravAstrophysics Working Group.Details on contributions and the mandatory code of conduct can be found in theCONTRIBUTING.mdfile.To-do items and changes to the API should be included in theCHANGELOG.mdfile.Contributions are not only welcome but encouraged, anywhere from new modules/customizations to bug-fixes to improved documentation and usage examples.  The git workflow is based around amainbranch which is intended to be (relatively) stable and operational, and an actively developeddevbranch.  New development should be performed in "feature" branches (made off of thedevbranch), and then incorporated via pull-request (back into thedevbranch).Testing(Unit)tests should be developed in two ways: for basic functions/behaviors, standard unit-tests can be placed in theholodeck/tests/directory.  More complex functionality should be tested in notebooks (innotebooks/) where they can also be used as demonstrations/tutorials for that behavior.  The python scriptscripts/convert_notebook_tests.pyconverts target notebooks into python scripts in theholodeck/tests/directory, which can then be run bypytest.  The scriptscripts/holotest.shwill run the conversion script and then runpytest.FormattingNew code should generally abide by PEP8 formatting, withnumpystyle docstrings.  Exceptions are:lines may be broken at either 100 or 120 columnsNotebooksPlease strip all notebook outputs before commiting notebook changes.  Thenbstripoutpackage is an excellent option to automatically strip all notebook output only in git commits (i.e. it doesn't change your notebooks in-place).  You can also usenbconvertto strip output in place:jupyter nbconvert --clear-output --inplace <NOTEBOOK-NAME>.ipynb.To install this package for just this repository:(1) install:pip install --upgrade nbstripoutorconda install -c conda-forge nbstripout(2) enable:nbstripout --install --attributes .gitattributes(run this in the top-levelholodeck/directory)CopyrightCopyright (c) 2023, NANOGravTheholodeckpackage uses anMIT license.AttributionA NANOGrav paper onholodeckis currently in preparation.Acknowledgements