LensFactory.Lenses.get_meshgridFunction
get_meshgrid(θx::RV, θy::RV, dθ::RV)

Generate a meshgrid of coordinates on which various quantities can be evaluated. At present, this function only generates square pixels. In future if the need arises, it can be extended to generate rectangular pixels as well.

source
LensFactory.Lenses.get_critical_densityFunction
get_critical_density(Dd::RV, Dds::RV, Ds::RV; unit::Symbol=:kg_m2)

Calculate the critical surface density,

\[Σ_{\rm cr} = \frac{c^2}{4 π {\rm G}} \frac{D_s}{D_d D_{ds}},\]

given the angular diameter distances. The result can be returned in different units,

  • :kg_m2 $\Rightarrow{\rm kg/m^2}$,
  • :msun_pc2 $\Rightarrow{\rm M_⊙/pc^2}$,
  • :msun_arcsec2 $\Rightarrow{\rm M_⊙/arcsec^2}$.
source
LensFactory.Lenses.get_deflectionFunction
get_deflection(lens::AbstractLens, θx::ROA, θy::ROA) --> Tuple{ROA, ROA}

Calculates the deflection angles (i.e., the gradient of the potential) for a given lens model. Returns a tuple of deflection components, i.e., $(ψ_x, ψ_y)$.

source
LensFactory.Lenses.get_jacobianFunction
get_jacobian(lens::AbstractLens, θx::ROA, θy::ROA) --> Tuple{ROA, ROA, ROA}

Calculates the jacobian (i.e., deformation tensor) of the lens mapping for a given lens model. The jacobian is a $2\times2$ matrix composed of the second derivatives of the potential, which is given as,

\[\mathcal{A} = \begin{pmatrix} ψ_{xx} & ψ_{xy} \\ ψ_{xy} & ψ_{yy} \end{pmatrix}.\]

Since the jacobian is symmetric (for single lens plane), only three components are returned, i.e., $(ψ_{xx}, ψ_{yy}, ψ_{xy})$.

source
LensFactory.Lenses.get_time_delayFunction
get_time_delay(lens::AbstractLens, θ_x::ROA, θ_y::ROA) --> ROA

Calculates the time delay for a given lens model. The corresponding expression is given as,

\[t_d(\pmb{θ}; \pmb{β}) = \frac{1+z_l}{\rm c} \frac{D_d D_s}{D_{ds}} \left[ \frac{(\pmb{θ} - \pmb{β})^2}{2} - \frac{D_{ds}}{D_s} \psi(\pmb{θ}) \right]\]

source
LensFactory.Lenses.get_magnification_imageFunction
get_magnification(lens::AbstractLens, θx::ROA, θy::ROA) --> ROA

Calculates the magnification for a given lens model. The corresponding expression is given as,

\[\mu = \frac{1}{\det \mathcal{A}} = \frac{1}{(1 - κ)^2 - γ^2}\]

source
LensFactory.Lenses.get_imageFunction
get_image(lens::AbstractLens, θx::ROA, θy::ROA, adis::Float64, β::NTuple{2, RV})::Vector{NTuple{2, RV}}
get_image(lens::AbstractLens, θx::ROA, θy::ROA, adis::Float64, β::Matrix{<:RV})::Matrix{<:RV}

Calculates the image position for a given lens model by solving the lens equation,

\[\pmb{β} = \pmb{θ} - \frac{D_{ds}}{D_s} ∇\psi(\pmb{θ})\]

source