How GLASS works

Note

This page gives a fairly high-level overview of how GLASS works. See the list of GLASS publications for additional in-depth references.

The main purpose of GLASS is to produce cosmological simulations on the sphere. The full, three-dimensional past light cone of the observer is discretised into a sequence of nested shells, which are further discretised in the angular dimensions into maps of the sphere.

Radial discretisation

The discretisation in the radial (line of sight) direction is done in GLASS using the concept of a radial window, which consists of a window function \(W\) that assigns a weight \(W(z)\) to each redshift \(z\). In the GLASS code, the RadialWindow named tuple is used to define radial windows.

A sequence \(W_1, W_2, \ldots\) of such window functions defines the shells of the simulation. For example, the tophat_windows() function takes redshift boundaries and returns a sequence of top hat windows, which are flat and non-overlapping.

../_images/how-glass-works-1.svg

Given such a sequence of window functions \(W_i\), GLASS discretises a continuous field \(F\) (e.g. the matter density in the universe) by using each \(W_i\) in turn to project \(F\) onto the sphere,

\[F_i = \frac{\int W_i(z) \, F(z) \, dz}{\int W_i(z) \, dz} \;.\]

This results in the sequence \(F_1, F_2, \ldots\) of integrated (projected) fields, which are spherical functions. GLASS then simulates the (radially) continuous field \(F(z)\) as the (radially) discretised fields \(F_i\).

Window functions

GLASS supports arbitrary window functions (although the computation of line-of-sight integrals makes some assumptions). The following window functions are included:

../_images/how-glass-works-2.svg

Angular discretisation

The projected fields \(F_i\) are still continuous functions on the sphere. They therefore require further discretisation, which turns \(F_i\) into a spherical map of finite resolution. In GLASS, this is done using the HEALPix [1] discretisation of the sphere.

Any spherical map is a discrete collection of spherical pixels \(F_{i,k}\), \(k = 1, 2, \ldots\). There are two ways that values can be assigned to pixels:

  1. Each pixel is set to the average of the field over its area, or

  2. Each pixel is set to the function value at its centre.

In the first case, the discretised map \(F_{i,k}\) is approximately a convolution of the continuous projected field \(F_i\) with a pixel kernel, usually called the pixel window function. This convolution is then sampled at the pixel centres. In the second case, the continuous projected field \(F_i\) itself is sampled at the pixel centres.

GLASS can simulate either kind of angular discretisation. The only difference between the two is whether or not the pixel window function is applied to the spherical harmonic expansion of the fields.

Line-of-sight integrals

The radial discretisation determines how well the simulation can approximate line-of-sight integrals of the form

\[I(z) = \int_{0}^{z} \! a(z') \, F(z') \, dz' \;,\]

with \(a\) some redshift-dependent factor, and \(F\) a continuous field simulated by GLASS. Integrals of this kind appear e.g. when simulating gravitational lensing or the distribution of galaxies.

To approximate such integrals using the discretised fields \(F_i\), three additional requirements are imposed on the radial windows of the simulated shells:

  1. Every window has an associated effective redshift \(z_{\rm eff}\) which is, in some sense, representative of the window. For example, this could be the mean or central redshift of the window function.

  2. The window functions of shells \(j < i\) vanish above the effective redshift \(z_{{\rm eff}, i}\) of shell \(i\),

    \[W_j(z) = 0 \quad \text{if $j < i$ and $z \ge z_{{\rm eff}, i}$.}\]
  3. The window functions of shells \(j > i\) vanish below the effective redshift \(z_{{\rm eff}, i}\) of shell \(i\),

    \[W_j(z) = 0 \quad \text{if $j > i$ and $z \le z_{{\rm eff}, i}$.}\]

In short, the requirements say that each shell has an effective redshift which partitions the window functions of all other shells. In GLASS, it is stored as the zeff attribute of RadialWindow. Functions that construct a list of windows for shells should ensure these requirements are met.

To approximate the integral \(I(z)\) using the projected fields \(F_i\), it is evaluated in the effective redshifts of the windows as \(I_i = I(z_{{\rm eff}, i})\). Inserting the partition of unity

\[1 = \frac{\sum_{j} W_j(z)}{\sum_{j'} W_{j'}(z)}\]

into the integrand, and exchanging summation and integration,

\[I_i = \sum_{j \le i} \int_{0}^{z_{{\rm eff}, i}} \! a(z') \, \frac{W_j(z')}{\sum_{j'} W_{j'}(z')} \, F(z') \, dz' \;,\]

where the outer sum was truncated at \(j = i\) using requirement 3. Conversely, the remaining integrals can for \(j < i\) be extended to infinity using requirement 2.

Now the crucial part: If the radial discretisation is sufficiently fine, everything in the integrands except for \(W_j(z) \, F(z)\) can be approximated by its value in the effective redshift \(z_{{\rm eff}, j}\),

\[I_i \approx \sum_{j < i} a(z_{{\rm eff}, j}) \, \frac{1}{W_j(z_{{\rm eff}, j})} \, \int W_j(z') \, F(z') \, dz' + R_i \;,\]

where \(\sum_{j'} W_{j'}(z_{{\rm eff}, j}) = W_j(z_{{\rm eff}, j})\) by requirements 2 and 3 above, and \(R_i\) is the remaining contribution of shell \(i\) to the integral,

\[R_i = \int_{0}^{z_{{\rm eff}, i}} \! a(z') \, \frac{W_i(z')}{\sum_{j'} W_{j'}(z')} \, F(z') \, dz' \;.\]

Overall, the approximation of the integral by the projected fields \(F_i\) is

\[I_i \approx \sum_{j < i} a(z_{{\rm eff}, j}) \, \frac{\int W_j(z) \, dz}{W_j(z_{{\rm eff}, j})} \, F_j + R_i \;.\]

It depends on the application whether \(R_i\) is best approximated as zero, or

\[R_i \approx a(z_{{\rm eff}, i}) \, \frac{\int W_i(z) \, dz}{W_i(z_{{\rm eff}, i})} \, F_i \;,\]

or set to some other value.