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.1.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.1-py3-none-any.whl (3.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigway-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 12494417d598c5372502e7b5b7cd62069ae97894a1c2089f870499bfb52b2871
MD5 fc82e8538849e157a67b37292cf50ef3
BLAKE2b-256 bc928553a08421a0b3996eaa3d69586889941a11fd0abbb334e6e7936e4726d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigway-1.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: sigway-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4755b1e6f18b06b0237bab79de64072a51140bfb41aad665503e652c57c0eac7
MD5 c69f06e5f7d75ad5265b2bc3c3317a6e
BLAKE2b-256 faaa4df7b7e44d344f8b182dfadb2b755eaa550ec039d929b5614aed5e99376f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigway-1.0.1-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