Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/lightcones/healpix_shell_redshifts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ Each shell is defined by a minimum and maximum redshift, as shown
below. All simulations use the same redshift shells except that
shells beyond the maximum redshift are omitted.

.. note:: Not all of the FLAMINGO simulations use the same
cosmological parameters, so the relation between redshift
and comoving distance varies. If you need to translate
between redshift, distance and time in the cosmology of a
specific simulation, we recommend :ref:`using swiftsimio
<swiftsimio_cosmology>`.

.. _shell_redshift_table:

.. list-table::
Expand Down
5 changes: 4 additions & 1 deletion source/lightcones/particle_lightcone_redshifts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ Particle lightcone redshift ranges

The tables below show the maximum redshift at which particles of each
type are output in each of the FLAMINGO simulations. Where no redshift
is listed no lightcone particle data are available.
is listed no lightcone particle data are available. The corresponding
comoving distances vary depending on the cosmological parameters of
the simulation and can be :ref:`computed with swiftsimio
<swiftsimio_cosmology>`.

There are two thresholds for gas particles to be output. All gas
particles are output up to the redshift specified in the "All gas"
Expand Down
38 changes: 28 additions & 10 deletions source/snapshots/swiftsimio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,7 @@ metadata. The simulation box size is available as::

snap.metadata.boxsize

If you need cosmology information, you can get an astropy `cosmology
object <https://docs.astropy.org/en/stable/cosmology/index.html>`__
with::

cosmo = snap.metadata.cosmology

This allows accurate calculation of the age of the universe or the
comoving distance at a particular redshift in the FLAMINGO cosmology,
for example. The numbers of particles of each type in the snapshot are
available as::
The numbers of particles of each type in the snapshot are available as::

snap.metadata.n_gas
snap.metadata.n_dark_matter
Expand Down Expand Up @@ -111,6 +102,33 @@ See the `swiftsimio documentation
<https://swiftsimio.readthedocs.io/en/latest/loading_data/index.html#using-metadata>`__
on snapshot metadata for more information.

.. _swiftsimio_cosmology:

Cosmology
---------

If you need cosmology information, you can get an astropy `cosmology
object <https://docs.astropy.org/en/stable/cosmology/index.html>`__ by
opening a snapshot as shown above, then accessing its cosmology
field::

cosmo = snap.metadata.cosmology

This is the recommended way to translate between redshift, comoving
distance and lookback time in the FLAMINGO simulations. You can
compute the age of the universe at :math:`z = 0.5`, for example,
with::

age_of_universe = cosmo.age(0.5)

or compute the comoving distance to the same redshift with::

comoving_distance = cosmo.comoving_distance(0.5)

See the `astropy documentation
<https://docs.astropy.org/en/stable/cosmology/index.html>`__ for more
details.

Reading particle data
---------------------

Expand Down
Loading