Section parameters
This section can be used to specify common constants or common free parameters. For example, in a galaxy cluster one could define the cluster redshift here, and use than this definition to build the lens associated to each member galaxy.
As in many other places in the setup file, the value of a parameter can be a constant (such as 2, 3.12, or π), a valid Julia expression evaluating to a constant (such as sqrt(10) - π) or a distribution. In the last situation, one can proceed in two ways: one can either set the value to a valid distribution from Distributions (such as Uniform(0.3, 0.8), Normal(5.0, 0.2), or Gamma(3.0, 1.2)), or one can use suitable aliases (see below). Parameters defined as a distributions are taken as free parameters: they will be subjects to parameter inference.
The parameter definitions are loaded in sequence, and any parameter, constant or distribution-like, can be used in any following line of the configuration file. This allows one to define easily and in a flexible way linked parameters. For example, one could set x: Uniform(0, 1) and y: -log(x): this way y would not be taken as a free parameter, but as a linked parameter, i.e. as a quantity that can change, but not in a free way.
Finally, note that the expression parameters are evaluated using the Julia parser, and therefore there is a lot of flexibility. One can even use vector parameters, or multivariate distributions.
Aliases
These are the recognized aliases:
a .. bis equivalent toUniform(a, b);x ± σis equivalent toNormal(x, σ);x ±ᵧ σis equivalent toGamma((x / σ)^2, σ^2 / x), i.e. a Gamma distribution with meanxand standard deviationσ;a ±ᵦ bis equivalent toBeta(a, b);(a₁, a₂) .. (b₁, b₂)is equivalent to a multivariate uniform distribution with support in the rectangle[a₁, b₁] × [a₂, b₂];(x₁, x₂) ± σis equivalent to a bi-variate normal distribution with identical standard deviation σ in both components;(x₁, x₂) ± (σ₁, σ₂)is equivalent to a bi-variate normal distribution with diagonal covariance, characterized by the two standard deviationsσ₁andσ₂;(x₁, x₂) ± (a, b, φ)is equivalent to a bi-variate normal distribution representing an uncertainty ellipse with semi-major axisa, semi-minor axisb, and position angleφ(in radians, measured clockwise from the y-axis);(x₁, x₂) ± (C₁₁, C₁₂, C₁₂, C₂₂), or(x₁, x₂) ± ((C₁₁, C₁₂), (C₁₂, C₂₂))is equivalent to a bi-variate normal distribution with full covarianceC.(q₁, q₂, q₃) ±ᵂ νis equivalent toGravity.QWishart([q₁, q₂, q₃], ν), which is likeWishart(ν, [q₁ q₂; q₂ q₃] ./ ν), a Wishart distribution with mean[q₁ q₂; q₂ q₃]and degrees-of-freedomν. Note thatGravity.QWishartproduces vector samples (as required by Gravity), whileWishartproduces matrix samples and therefore cannot be used directly.(q₁, q₂, q₃) ±ᴵᵂ νis equivalent toGravity.QIWishart([q₁, q₂, q₃], ν), which is likeInverseWishart(ν, [q₁ q₂; q₂ q₃] .* ν), an inverse Wishart distribution. Note thatGravity.QIWishartproduces vector samples (as required by Gravity), whileInverseWishartproduces matrix samples and therefore cannot be used directly.(ϵ₁, ϵ₂) ±ₑ νis equivalent toGravity.EllipticityDistribution((ϵ₁, ϵ₂), ν). This is a special distribution with support in the unit disk. It is strictly related to the Wishart distribution (in the sense that the ellipticity of a quadrupole sampled from a Wishart distribution is distributed as an ellipticity distribution).νhas the same meaning as for a Wishart distribution: therefore, large values forνproduce tighter distributions.
Special parameters
A few parameters have a special meaning:
angular_unit: indicates the unit used in all angular data, including the image positions and associated measurement errors, the lens positions, the lens cores and truncation radii... The value provided must be expressed in arc-seconds. By default,angular_unit: 1.0, so all angular data are taken to be expressed in arc-seconds.wcs_origin: a 2-tuple that indicates the origin, in equatorial coordinates, of the coordinate system used in all angular data. This parameter is only needed for extended images or to interact with external viewers. Together withangular_unit, it can also be specified in the WCS section of the configuration file in a more generic way.background: used to indicate, within the configuration file, the image that should be used as background when plotting the lens model (see the Visual interface page). In its simplest version, this parameter is a single string indicating a local filename or a URL: this can be a FITS file, but also a JPEG, PNG, or TIFF image with suitable astrometry using AVM metadata. Alternatively, one can indicate explicitly the WCS associated to the image using a flexible syntax, as inparameters: background: image: RGB.jpg wcs: RGB.fits url: https://myniceserver.org/data/RGB.jpgAs shown in the example above, the background section can include, in addition to the
wcsfield, aurlfield. This allows one to specify both a local filename and a remote URL, which is preferentially used by the Aladin plotting backend.use_threads: a comma-separated list of situations where threads are used. Can be any combination ofgrid(use threads for grid operations),imageplane(image plane operations),lensunmap(inversion of the lens equation),xsources(extended sources),sampling(MCMC sampling operations),blas(BLAS matrix operations),always(all of above),never(never use threads). Additionally, if CUDA is available, the combinationscuda-gridandcuda-xsourcesare also accepted. The default isuse_threads: sampling. See the documentation ofGravity.parse_use_threadsfor further details.lens_lenses: this boolean value controls the lensing of lenses in multi-plane system. If set totrue(the default), the constraints put on lenses located behind other lens planes will be taken as set on the observed properties of these lenses. This will affect both the lens positions, and the lens ellipticities (only for elliptical lenses).stable_lenses: indicates if lens planes are allowed to change order. Can be set totrue, meaning that lens planes are guaranteed to have stable rank;false, meaning that lens planes are free to change rank; andauto, in which case the stability of lens planes is deduced from the given setup. In the last case, the code generates many samples from the parameters' prior distributions, computes the lens redshifts, and check if lenses can change rank. Note that for this task, lenses are grouped to the same plane only if their redshifts are identical expressions: thus, if two lenses have as redshifts0.5andz, wherezis a constant that evaluates to0.5, they will not be taken to belong to the same plane.strict_priors: iftrue(the default), a warning message is displayed for point-like sources that have non-standard (i.e., in most cases Gaussian) priors, as they can make the computation of the evidence slightly inaccurate. Can be set tofalseto avoid this check and the related warning messages.