Skip to main content

A package for computing scalar induced gravitational waves from inflation

Project description

SIGWAY

Scalar-Induced Gravitational Wave AnalYsis — second-order, scalar-induced gravitational-wave signals.

Documentation · Paper · PyPI

SIGWAY is a collaborative effort of the LISA Cosmology Working Group to build the foundation of a data analysis pipeline for stochastic gravitational wave signals emitted by curvature perturbations in the early universe. Currently the package contains modules for

  • solving the Mukhanov-Sasaki equation for single field ultra-slow roll inflationary models and computing the primordial scalar power spectrum $\mathcal{P}_\zeta$;
  • computing the second order gravitational wave power spectrum $\Omega_{\mathrm{GW}}$ from $\mathcal{P}_\zeta$ for reentry during radiation domination or a phase of early matter domination.

Full documentation — installation, worked examples, the physics, and the API reference — is at sigway.readthedocs.io.

Using this code

If you use this code please cite our paper (https://arxiv.org/pdf/2501.11320) and feel free to drop me an email if you encounter any problems. Also, if there are bugs please report them!

Installation

SIGWAY is on PyPI:

pip install sigway

To work on the code, install the development version from a clone in editable mode:

git clone https://github.com/jonaselgammal/SIGWAY.git
cd SIGWAY
pip install -e .

Usage

$\Omega_{\mathrm{GW}}(f)$ is computed by composing three pieces — a power spectrum $\mathcal{P}_\zeta$ (sigway.perturbations), a kernel (the transfer function, sigway.kernels) and an integrator (the numerical method, sigway.integrators, default Simpson) — into an OmegaGW model (sigway.spectrum):

import jax.numpy as jnp
from sigway.spectrum import OmegaGW
from sigway.kernels import RadiationKernel
from sigway.perturbations import AnalyticPerturbations

def pzeta(k, logA, logks):                 # your P_zeta(k, *params)
    A, ks = 10.0 ** logA, 10.0 ** logks
    return A * jnp.exp(-0.5 * (jnp.log(k / ks) / 0.3) ** 2)

f = jnp.geomspace(1e-5, 1e-1, 200)
model = OmegaGW(
    AnalyticPerturbations(pzeta, ("logA", "logks")),
    RadiationKernel(),                     # carries the RD normalisation
    s=jnp.linspace(0.0, 1.0, 10),
    t=jnp.geomspace(1e-5, 1e3, 800),       # array (shared over k) or t(k, *theta)
)

omega = model(f, -2.0, -2.0)               # theta in model.parameter_names order

The model owns a single ordered parameter vector for inference:

model.parameter_names          # ('logA', 'logks')
model(f, logA=-2.0, logks=-2.0)            # keyword form also works
fisher_jac = model.jacobian(f, [-2.0, -2.0])   # d Omega_GW / d theta (jax.jacfwd)

Swap in other physics by changing a component:

  • Early matter domination: from sigway.kernels import InstantEMDKernel (its source cutoff kmax is a ScalarPerturbations parameter).
  • Mukhanov–Sasaki $\mathcal{P}_\zeta$: wrap a sigway.ms_solver.SingleFieldSolver in sigway.perturbations.SingleFieldPerturbations.

The previous OmegaGWjax / OmegaGWms classes are deprecated (they emit a DeprecationWarning); use OmegaGW with a kernel and a perturbation instead.

Dependencies

The current, minimal public version that contains the core functionality of the package needs jax, diffrax, numpy, scipy and matplotlib. The dependencies should be installed automatically but if not pip is your friend.

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

sigway-1.0.0.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

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

sigway-1.0.0-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

Details for the file sigway-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for sigway-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d5a6388f2fd346cfe9a44c70bf19652da54216eb9d604d4ac99614944209fe22
MD5 9b4f100a5865903c2443428b6dfedfb1
BLAKE2b-256 5e4ce8038f1ef7047dd1706c693c83f465606bba3aee4e01a6de8d273ad2a871

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigway-1.0.0.tar.gz:

Publisher: publish.yml on jonaselgammal/SIGWAY

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

File details

Details for the file sigway-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sigway-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sigway-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ada11f0c5d384a6523015c3fec916d175772aef3c696053de49e1809870dc5f1
MD5 30774b25fa15f39dde1e26b48a5c1c24
BLAKE2b-256 6c0ee5c953bc10d457aed398c4ade3dc7bbcb7a822e7847240cdea546f5310cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigway-1.0.0-py3-none-any.whl:

Publisher: publish.yml on jonaselgammal/SIGWAY

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