Skip to main content

Fast JAX-first astrophysical population generation.

Project description

fastropop

fastropop logo

fastropop is the package that generates your SMBHB populations at lightning speed. It is designed to be a fast, flexible, and user-friendly tool for simulating the cosmic population of supermassive black hole binaries (SMBHBs) and their gravitational wave signatures in the nanohertz regime.

The package is centered on the semi analytic population from arXiv:0804.4476, which is implemented in the SemiAnalyticPopulation class. It also includes a suite of utilities for computing characteristic-strain quantities, sampling population realizations, binning into PTA-style spectra

Documentation: fastropop.readthedocs.io

This repository is maintained by Jonas El Gammal and reflects scientific work carried out with Chiara Cecchini, Gabriele Franciolini, and Mauro Pieroni. The package was used for the analysis in arXiv:2605.05157, but of course you can use it for whatever you want!

What It Does

  • defines a semi-analytic SMBHB population model
  • computes characteristic-strain quantities and expected binary counts
  • samples population realizations with JAX-backed randomness
  • bins sampled realizations into PTA-style spectra
  • generates HEALPix skymaps with either jax-healpy or healpy

Installation

git clone git@github.com:jonaselgammal/fastropop.git
cd fastropop
pip install -e .

Notes:

  • jax and jaxlib are core dependencies
  • skymap generation requires a HEALPix backend
  • jax-healpy is preferred when installed
  • standard healpy is supported as a fallback backend

Quick Start

import fastropop

pop = fastropop.SemiAnalyticPopulation()

distM, distz, distlog10f = pop.sample_dist(Nbinaries=1000, key=0)
spec = fastropop.binning(distM, distz, distlog10f, do_plot=False)

For reproducible stochastic methods, pass a JAX key or integer seed:

params = fastropop.draw_parameters(key=0)
Nbinaries = pop.generate_poisson_realization(1, key=1)

If key=None, the package creates a fresh nondeterministic JAX key internally.

Notebooks

The main examples currently live in:

  • examples/semi-analytic.ipynb
  • examples/population-spectra.ipynb
  • examples/skymaps.ipynb

Repository Layout

src/fastropop/        Package source
tests/                Unit and regression tests
examples/             Example scripts and notebooks
.github/workflows/    CI and release automation

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

fastropop-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

fastropop-0.1.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file fastropop-0.1.0.tar.gz.

File metadata

  • Download URL: fastropop-0.1.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastropop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab993b5862e6a615efa10730641ccaac8010579f8c980af69b441da0d1f40bfb
MD5 9cd3b5b32a921ded4019d8b064c5ddfb
BLAKE2b-256 e6488ca870e55162e56750e0ec6b283143e8fd7e27bdd7dfb6ba6bd16c308bd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastropop-0.1.0.tar.gz:

Publisher: release.yml on jonaselgammal/fastropop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastropop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastropop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fastropop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77f6b257d41cf20d9ac4e1f28b49ff0c5830a2a00d20ca8db586b832cde1171b
MD5 259790b9551375840f394e5df727da35
BLAKE2b-256 878db1ea5850c1062ed60aba1ead8957dd1191acd3fc51212b031cabf634979b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastropop-0.1.0-py3-none-any.whl:

Publisher: release.yml on jonaselgammal/fastropop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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