Installation¶
SIGWAY is a pure-Python package built on JAX.
Requirements¶
Install¶
From PyPI:
To work on the code, install the development version from a clone in editable mode:
Editable (-e) means changes to the source take effect without reinstalling.
Use float64
SIGW integrals span many orders of magnitude. Enable double precision before any other JAX call, at the top of your script or notebook:
Check it worked¶
import jax; jax.config.update("jax_enable_x64", True)
import jax.numpy as jnp
from sigway.spectrum import OmegaGW
from sigway.kernels import RadiationKernel
from sigway.perturbations import AnalyticPerturbations
model = OmegaGW(
AnalyticPerturbations(lambda k, A: A * jnp.ones_like(k), ("A",)),
RadiationKernel(),
s=jnp.linspace(0.0, 1.0, 10),
t=jnp.geomspace(1e-4, 1e2, 200),
)
print(model.parameter_names) # ('A',)
If that prints ('A',) you're ready for the simple example.