pycauset.spacetime.FLRW
Inherits from: Spacetime
FLRW spacetime with flat spatial slices (k=0): ds² = −dt² + a(t)² dx⃗².
Parameters
- dimension (int): Spacetime dimension
d(≥ 2). - scale_factor (float | callable): A power-law exponent
p(a(t) = t^p;p=0is Minkowski) or a callablea(t) -> float. - time_extent (float): The time range.
- space_extent (float): The spatial box size.
Notes (honest caveats)
is_causaluses the null condition∫_{t₁}^{t₂} dt/a(t) ≥ |Δx⃗|.- The sampler is uniform in
(t, x⃗), a documented parametrization, not the FLRW-invariant measure unlessa(t)is constant. scalar_coeffsraisesNotImplementedError, coefficients are manual(a, b).
Methods
is_causal
True iff the comoving horizon between u and v covers their spatial separation.
sample / volume
volume is the finite-box volume L^{d-1} · ∫ a(t)^{d-1} dt.
Example
from pycauset import spacetime
# a(t) = t (radiation-like), or pass a callable a(t)
st = spacetime.FLRW(2, scale_factor=1, time_extent=1.0, space_extent=1.0)