Galaxies and ray tracing#
Build galaxies from light and mass profiles, then use a Tracer to calculate how their light is gravitationally lensed. The objects below separate individual galaxies, collections of galaxies and multi-plane ray tracing.
Galaxies and collections#
Galaxy holds components at a specified redshift. Component names such as bulge, disk and mass let you identify their contributions. Galaxies evaluates a collection, combining its light or mass quantities as appropriate.
Class representing a galaxy, which is composed of attributes used for fitting galaxies (e.g. light profiles, mass profiles, pixelizations, etc.). |
|
A collection of galaxies, used to perform operations on the galaxies as a group. |
Use Tracer for lensing between redshift planes; a Galaxies collection alone does not perform multi-plane ray tracing.
Ray tracing#
Tracer groups galaxies into planes by redshift and propagates coordinates through those planes using the lensing cosmology. It provides lensed images and lensing quantities including deflections, convergence, magnification, critical curves and caustics.
import autolens as al
lens = al.Galaxy(
redshift=0.5,
mass=al.mp.Isothermal(einstein_radius=1.0),
)
source = al.Galaxy(
redshift=1.0,
bulge=al.lp.Sersic(intensity=1.0, effective_radius=0.2),
)
tracer = al.Tracer(galaxies=[lens, source])
This constructs a model; it does not fit data. The ray-tracing guide shows how to evaluate and plot it.
Performs gravitational lensing ray-tracing calculations based on an input list of galaxies and a cosmology. |
External mass fields#
MassField holds mass components at their own redshift without assigning them galaxy light. Use it for environmental contributions such as external shear, a mass sheet or an external potential. It also accepts other mass profiles when they represent the environment.
Pass fields through Tracer(galaxies=..., fields=[field]). Each field is placed at its redshift and contributes to the lensing calculations, while remaining separate from the galaxies. A single fields=field is also accepted; tracer.fields is stored as a list.
Attaching external mass components directly to a Galaxy remains supported.
Class representing the external mass field at a given redshift. |
Fixed and fitted redshifts#
For a known redshift, pass a number directly to Galaxy(redshift=...). When the redshift itself is to be inferred, Redshift provides a model component whose value can be assigned a prior.
import autofit as af
redshift = af.Model(al.Redshift)
redshift.redshift = af.UniformPrior(lower_limit=0.8, upper_limit=1.2)
galaxy_model = af.Model(al.Galaxy, redshift=redshift)
The prior limits are illustrative, not a default recommendation. For lensing, choose redshifts and priors consistent with the intended ordering of lens and source planes. Add the light or mass components required by your model before fitting.
Class used when assigning a redshift to a Galaxy object. |
Galaxy catalogues#
Load catalogue entries with y, x and luminosity columns to construct populations of galaxies. galaxy_table_from_csv reads a table; galaxies_from_csv_tables and galaxy_af_models_from_csv_tables build galaxy instances or model components from the supplied tables.
The scaling-relation examples explain how measured luminosities can constrain the mass model of a companion population. The multi-galaxy, group and cluster introductions show the different modelling workflows.
|
Load a galaxy population from a CSV with columns |
|
Combine one or more family tables into concrete |
|
Combine one or more family tables into |