SearcharxivSearch

arXiv subjects

Herman Sletmoen

Publications and source records attributed to Herman Sletmoen.

3 recordsLinked to original sources

Chebyshev interpolation in Einstein-Boltzmann codes

Einstein-Boltzmann codes compute theoretical predictions of cosmological models and rely heavily on interpolation in their independent variables: time $\tau$, wavenumber $k$ and multipole $\ell$. We give a practical summary of interpolation with Chebyshev polynomials, which converges rapidly for smooth functions and thus pairs naturally with approximation-free Einstein-Boltzmann codes. By solving the perturbations and line-of-sight integrals at Chebyshev nodes in $k$ and $\ell$, we show that Chebyshev polynomials interpolate to higher precision than traditional cubic splines from fewer explicit solutions. On a set of example spectra for matter and the cosmic microwave background (CMB), we find up to four orders of magnitude lower interpolation error using the same number of points. For a typical CMB temperature spectrum computed with interpolation in both $k$ and $\ell$, Chebyshev polynomials converge to $10^{-4}$-$10^{-5}$ relative error with only 50-80 points per variable, while cubic splines approach $10^{-4}$ error with 200 points, translating to a $2.5\times$-$4\times$ speedup. The exact improvement depends on the target function and is generally more dramatic at high precision levels. Standard Chebyshev $\ell$-interpolation needs line-of-sight integrals generalized to non-integer $\ell$, but we show a way to avoid this by rounding the nodes to integers. Chebyshev interpolation is implemented in SymBoltz, which is available at https://github.com/hersle/SymBoltz.jl.

astro-ph.CO

SymBoltz.jl: A symbolic-numeric, approximation-free, and differentiable linear Einstein-Boltzmann solver

SymBoltz is a new Julia package for solving the linear Einstein-Boltzmann equations in cosmology. It features a symbolic-numeric interface for specifying equations, is free of approximation switching schemes, and is compatible with automatic differentiation. Cosmological models are built from replaceable physical components in a way that scales well to extended models, or alternatively written as one compact system of equations. The modeler provides their equations, and SymBoltz solves them while reducing friction in the modeling process. Symbolic knowledge enables powerful automation of tasks, such as separating computational stages (e.g., background and perturbations), generating analytical and sparse Jacobian matrices, and interpolating arbitrary variables from the solution. Implicit solvers integrate the full stiff equations at all times without approximations, which greatly simplifies the code. Performance remains comparable to existing approximation-based codes due to efficient high-order implicit methods, fast generated code, optimal handling of the Jacobian, and sparse matrix methods. Automatic differentiation gives exact derivatives of any output with respect to any input, which is important for gradient-based Markov chain Monte Carlo (MCMC) sampling in large parameter spaces, Fisher forecasting, emulator training, and sensitivity analyses. The main features form a synergy that reinforces the design of the code. Output spectra agree with established codes up to 0.1% with standard precision levels. More work is needed to implement additional features and for fast reverse-mode automatic differentiation of scalar loss functions. SymBoltz is publicly available with single-command installation and extensive documentation. We welcome all contributions to the code from the community.

astro-ph.CO

A simple prediction of the nonlinear matter power spectrum in Brans-Dicke gravity from linear theory

Brans-Dicke (BD), one of the first proposed scalar-tensor theories of gravity, effectively makes the gravitational constant of general relativity (GR) time-dependent. Constraints on the BD parameter $\omega$ serve as a benchmark for testing GR, which is recovered in the limit $\omega \rightarrow \infty$. Current small-scale astrophysical constraints $\omega \gtrsim 10^5$ are much tighter than large-scale cosmological constraints $\omega \gtrsim 10^3$, but the two decouple if the true theory of gravity features screening. On the largest cosmological scales, BD approximates the most general second-order scalar-tensor (Horndeski) theory, so constraints here have wider implications. These constraints will improve with upcoming large-scale structure and cosmic microwave background surveys. To constrain BD with weak gravitational lensing, one needs its nonlinear matter power spectrum $P_\mathrm{BD}$. By comparing the boost $B = P_\mathrm{BD}/P_\mathrm{GR}$ from linear theory and nonlinear $N$-body simulations, we show that the nonlinear boost can simply be predicted from linear theory if the BD and GR universes are parameterized in a way that makes their early cosmological evolution and quasilinear power today similar. In particular, they need the same $H_0 / \sqrt{\smash[b]{G_{\rm eff}(a=0)}}$ and $\sigma_8$, where $G_{\rm eff}$ is the (effective) gravitational strength. Our prediction is $1\%$ accurate for $\omega \geq 100$, $z \leq 3$, and $k \leq 1\,h/\mathrm{Mpc}$; and $2\%$ up to $k \leq 5\,h/\mathrm{Mpc}$. It also holds for $G_\mathrm{BD}$ that do not match Newton's constant today, so one can study GR with different gravitational constants $G_\mathrm{GR}$ by sending $\omega \rightarrow \infty$. We provide a code that computes $B$ with the linear Einstein-Boltzmann solver hi_class and multiplies it by the nonlinear $P_\mathrm{GR}$ from EuclidEmulator2 to predict $P_\mathrm{BD}$.

astro-ph.CO