Skip to main content

ringdown

PyPI version Binder DOI pytest Documentation Status

Bayesian analysis of black hole ringdowns. The original paper that inspired this code package is Isi, et al. (2019); a full description of the code and method can be found in Isi & Farr (2021).

Installation

This package is pip installable:

pip install ringdown

For the latest and greatest version, you can install directly from the git repo:

pip install git+https://github.com/maxisi/ringdown.git

Additionally, you may follow the JAX documentation to install JAX with GPU support.

Complete Environments

A complete conda environment that includes all the prerequisites (and more!) to install ringdown can be found in environment.yml in the current directory:

conda env create -f environment.yml
conda activate ringdown
pip install ringdown

will leave the shell in an environment that includes jupyterlab ready to explore the ringdown package.

The environment.yml file enables running ringdown in JupyterHub services like MyBinder by pointing MyBinder at this repository or clicking the button at the top of this README.

Examples and tips

See the example gallery in the docs for several examples. You can download the Jupyter notebooks featured in the docs from the docs/examples.

Performance notes

In order to run Jax on a CPU with four cores and use double precision, you can do the following at the top of your script:

# disable numpy multithreading to avoid conflicts
# with jax multiprocessing in numpyro
import os
os.environ["OMP_NUM_THREADS"] = "1"

# set jax up to use double precision
from jax import config
config.update("jax_enable_x64", True)

# import numpyro and set it up to use 4 CPU devices
import numpyro
numpyro.set_host_device_count(4)
numpyro.set_platform('cpu')

To run on a GPU with single precision you can instead do:

# set jax to use single precision (this is the default so no need to run the lines below)
# from jax import config
# config.update("jax_enable_x64", False)

# import numpyro and set it up to use 4 CPU devices
import numpyro
numpyro.set_platform('gpu')

You will see significant performance enhancements when running ona GPU with 32-bit precision. If you have multiple GPUs, numpyro can use them in parallel to run different chains, just as with CPUs. Sampling one chain for a GW150914-like system takes O(s) on an Nvidia A100 GPU.

⚠️ Caveat emptor: depending on the autocovariance function (ACF), using float32 can cause numerical problems when computing the likelihood; ringdown will automatically rescale the strain in an attempt to prevent this, but you should use this feature at your own risk.

Citations

We ask that scientific users of this code cite the corresponding Zenodo entry (see blue DOI badge above), as well as Isi & Farr (2021):

@article{Isi:2021iql,
    author = "Isi, Maximiliano and Farr, Will M.",
    title = "{Analyzing black-hole ringdowns}",
    eprint = "2107.05609",
    archivePrefix = "arXiv",
    primaryClass = "gr-qc",
    reportNumber = "LIGO-P2100227",
    month = "7",
    year = "2021"
}

Download files

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

Source Distribution

ringdown-1.1.0.tar.gz (9.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ringdown-1.1.0-py3-none-any.whl (148.1 kB view details)

Uploaded Python 3

File details

Details for the file ringdown-1.1.0.tar.gz.

File metadata

  • Download URL: ringdown-1.1.0.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for ringdown-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5ce5c63f3ca791d3579b12ddc5d4e012f1cf314985a9bd9b298120e8d3a9a64e
MD5 309ca748d89fcefca1c0b75292ce2a94
BLAKE2b-256 ab72ff2d364bfb3ff086c4e0e07f9e09f55d75f8e966ace637d9e6733a3d80db

See more details on using hashes here.

File details

Details for the file ringdown-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ringdown-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.14

File hashes

Hashes for ringdown-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 659bdac6b34e99379c4de1714e0c4d2d236fbcd774bfb86fc7280504ded5c882
MD5 ba1a60da18357c3517f36066e229bcaa
BLAKE2b-256 11b0f977bbf48cce95ff7866a8b80d80f5bbc7ffd07f99e9ede486d2c877cd03

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.0

2 files

0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page