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 ≋●≋●≋

This package, which is actively under development, 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.8, and tests are run on versions 3.8, 3.9, 3.10.

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.

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/tester.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) 2022, 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.0.tar.gz (73.0 MB view hashes)

Uploaded Source

Built Distribution

holodeck_gw-1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (73.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

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