Skip to main content

holodeck: Massive black hole (MBH) binary simulator for pulsar timing array signals.

Project description

holodeck

GitHub version build codecov Documentation Status

Massive Black-Hole Binary Population Synthesis for Gravitational Wave Calculations ≋●≋●≋

holodeck logo

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.

Installation

The holodeck framework is currently under substantial, active development. It will not be available on pypi (pip) or via conda install until it has stabilized. Currently holodeck requires python >= 3.9, and tests are run on versions 3.9, 3.10, 3.11.

The recommended installation for active development is to:

  1. OPTIONAL: create and activate a new anaconda environment to isolate your build: conda create --name holo310 python=3.10; conda activate holo310
  2. Clone the holodeck repository: git clone https://github.com/nanograv/holodeck.git
  3. Install the required external packages specified in the requirements file: pip install -r requirements.txt. OPTIONAL: install development requirements: pip install -r requirements-dev.txt
  4. Build the required c libraries from holodeck cython code: cd holodeck; python setup.py build_ext -i
  5. Perform an development/editable local installation: python setup.py develop

The 'editable' installation allows the code base to be modified, and have those changes take effect when using the holodeck module without having to rebuild/reinstall it.

MPI

For some scripts (particularly for generating libraries), an MPI implementation is required (e.g. openmpi), along with the mpi4py package. This is not included as a requirement in the requirements.txt file as it significantly increases the installation complexity, and is not needed for many holodeck use cases. If you need the additional functionality, try installing mpi4py and if needed an MPI implementation.

To see if you have mpi4py installed, run python -c 'import mpi4py; print(mpi4py.__version__)' from a terminal.

macos

If you are using homebrew on macos, you should be able to simply run: brew install mpi4py which will include the required openmpi implementation. If you already have an MPI implementation installed, and you are using anaconda, you should be able to install the mpy4py python package with: conda install mpi4py.

Quickstart

The best way to get started is using the demonstration/testing notebooks included in the notebooks/ directory.

Documentation

The primary sources of documentation for holodeck are this README.md file, the notebooks included in the notebooks/ directory, and docstrings included in the source code directly. readthedocs documentation are being written and improved, and a methods paper is in preparation.

Contributing

This project is being led by the NANOGrav Astrophysics Working Group.

Details on contributions and the mandatory code of conduct can be found in the CONTRIBUTING.md file.

To-do items and changes to the API should be included in the CHANGELOG.md file.

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 a main branch which is intended to be (relatively) stable and operational, and an actively developed dev branch. New development should be performed in "feature" branches (made off of the dev branch), and then incorporated via pull-request (back into the dev branch).

Testing

(Unit)tests should be developed in two ways: for basic functions/behaviors, standard unit-tests can be placed in the holodeck/tests/ directory. More complex functionality should be tested in notebooks (in notebooks/) where they can also be used as demonstrations/tutorials for that behavior. The python script scripts/convert_notebook_tests.py converts target notebooks into python scripts in the holodeck/tests/ directory, which can then be run by pytest. The script scripts/holotest.sh will run the conversion script and then run pytest.

Formatting

New code should generally abide by PEP8 formatting, with numpy style docstrings. Exceptions are:

  • lines may be broken at either 100 or 120 columns

Notebooks

Please strip all notebook outputs before commiting notebook changes. The nbstripout package 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 use nbconvert to 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 nbstripout or conda install -c conda-forge nbstripout
  • (2) enable: nbstripout --install --attributes .gitattributes (run this in the top-level holodeck/ directory)

Copyright

Copyright (c) 2023, NANOGrav

The holodeck package uses an MIT license.

Attribution

A NANOGrav paper on holodeck is currently in preparation.

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

holodeck-gw-1.3.tar.gz (72.4 MB view details)

Uploaded Source

Built Distributions

holodeck_gw-1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

holodeck_gw-1.3-cp311-cp311-macosx_10_9_x86_64.whl (72.7 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

holodeck_gw-1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

holodeck_gw-1.3-cp310-cp310-macosx_10_9_x86_64.whl (72.7 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

holodeck_gw-1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (73.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

holodeck_gw-1.3-cp39-cp39-macosx_10_9_x86_64.whl (72.7 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

Details for the file holodeck-gw-1.3.tar.gz.

File metadata

  • Download URL: holodeck-gw-1.3.tar.gz
  • Upload date:
  • Size: 72.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for holodeck-gw-1.3.tar.gz
Algorithm Hash digest
SHA256 ef27cd8cb329614d73cc973b9c789af06625f5cfa752ced9b8f5a3aff1e839a3
MD5 cfd35d483f4b348c34c0e01a330566e6
BLAKE2b-256 847673ccdaeff15e45509d98628d3cb00f57de6827dfd6f543e50edb3a81f758

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 98b08240e0913b1223e013976651290618bafc5259db094fc826d243dbf1f860
MD5 7119c2e2361b1609ad50e8b650fdb3a7
BLAKE2b-256 e3051f260ea05afcd5987696d99fadbdf3b4e1ff9a677b62734348e3303370a1

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e49cb7d45a4d21acf3f731fe58eb088dc54b75395d8063a084ed77bed83f30f4
MD5 5c1f244ad052e2aa182e0f1234d8de91
BLAKE2b-256 cf6953e86c6c75b709f3856f2cc8d5a7111245ccfe24e1c8ee359ac09a92fe2b

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 809e4839ff87953bb00e5920ba841ff1e8b2c0a50cbba4efa2f9526be70c546e
MD5 000d31f7466de946ef4a2ce43b2a716b
BLAKE2b-256 bcb16b2dbcee5484b9af39a2d947a2a6aa6eb7acb9d927cafe9a9fdee1db912d

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c45c832bab19312b29daf72ccbadb4415a00a64ea582577c0608bd82ad99ca1
MD5 f1e952494fd8aec0bb4240fc0f6ea6e2
BLAKE2b-256 b525a800e7f5a9c8a433a0b3fc3d4e4bfe2f007c4298344b010c896759affa52

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9ebb7ebf6520c55a01aa37a53a09b3d8307dc521d7ba7063eeb1570868585cf
MD5 db4c5437b4df091900494927605aee15
BLAKE2b-256 a5b3373c50437babb74d833044ed55ea5ba80403b3794b4a8945cf72d4dcec6e

See more details on using hashes here.

File details

Details for the file holodeck_gw-1.3-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for holodeck_gw-1.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 58dd1d591fee08766bb607ec3f847600f103c0cb0f4c8dc4a584d445804dab4a
MD5 07f478fa07ff83d91aed9cced195944d
BLAKE2b-256 896144ae121f101354c94a6421e3774fd9fef948c140b4fb5a2f49e5cc8392fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page