A package for computing scalar induced gravitational waves from inflation
Project description
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 cutoffkmaxis aScalarPerturbationsparameter). - Mukhanov–Sasaki $\mathcal{P}_\zeta$: wrap a
sigway.ms_solver.SingleFieldSolverinsigway.perturbations.SingleFieldPerturbations.
The previous
OmegaGWjax/OmegaGWmsclasses are deprecated (they emit aDeprecationWarning); useOmegaGWwith 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5a6388f2fd346cfe9a44c70bf19652da54216eb9d604d4ac99614944209fe22
|
|
| MD5 |
9b4f100a5865903c2443428b6dfedfb1
|
|
| BLAKE2b-256 |
5e4ce8038f1ef7047dd1706c693c83f465606bba3aee4e01a6de8d273ad2a871
|
Provenance
The following attestation bundles were made for sigway-1.0.0.tar.gz:
Publisher:
publish.yml on jonaselgammal/SIGWAY
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigway-1.0.0.tar.gz -
Subject digest:
d5a6388f2fd346cfe9a44c70bf19652da54216eb9d604d4ac99614944209fe22 - Sigstore transparency entry: 1939150854
- Sigstore integration time:
-
Permalink:
jonaselgammal/SIGWAY@8695a7975b55354fe9636dc87a8fbfcf9e3283c6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jonaselgammal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8695a7975b55354fe9636dc87a8fbfcf9e3283c6 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada11f0c5d384a6523015c3fec916d175772aef3c696053de49e1809870dc5f1
|
|
| MD5 |
30774b25fa15f39dde1e26b48a5c1c24
|
|
| BLAKE2b-256 |
6c0ee5c953bc10d457aed398c4ade3dc7bbcb7a822e7847240cdea546f5310cb
|
Provenance
The following attestation bundles were made for sigway-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on jonaselgammal/SIGWAY
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigway-1.0.0-py3-none-any.whl -
Subject digest:
ada11f0c5d384a6523015c3fec916d175772aef3c696053de49e1809870dc5f1 - Sigstore transparency entry: 1939150968
- Sigstore integration time:
-
Permalink:
jonaselgammal/SIGWAY@8695a7975b55354fe9636dc87a8fbfcf9e3283c6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jonaselgammal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8695a7975b55354fe9636dc87a8fbfcf9e3283c6 -
Trigger Event:
release
-
Statement type: