Gaussian Lens
The Gaussian lens is described by a projected surface mass density of Gaussian form,
\[\begin{equation*} Σ(R) = \frac{M}{2π σ^2} \exp\left( -\frac{R^2}{2σ^2} \right), \end{equation*}\]
where $M$ is the total mass of the lens and $σ$ is the standard deviation of the Gaussian. Thanks to its finite total mass and smooth analytic profile, it is often used as a building block to represent more complex mass distributions (see the Multi-Gaussian lens). Defining the angular scale radius $θ_s = σ / D_d$, the convergence profile can be written as
\[\begin{equation*} κ(θ) = κ_s \exp\left( -\frac{|\pmb{θ} - \pmb{θ}_c|^2}{2 θ_s^2} \right), \end{equation*}\]
where $κ_s$ is the central convergence and $\pmb{θ}_c$ represents the lens center. Since the mass enclosed within $θ$ is analytic, $M(θ) = M \left[ 1 - \exp\left(-θ^2/2θ_s^2\right) \right]$, the deflection angle takes a simple closed form,
\[\begin{equation*} \pmb{α}(\pmb{θ}) = \frac{4{\rm G} M}{{\rm c}^2} \frac{1}{D_d} \left[ 1 - \exp\left( -\frac{|\pmb{θ} - \pmb{θ}_c|^2}{2 θ_s^2} \right) \right] \frac{\pmb{θ} - \pmb{θ}_c}{|\pmb{θ} - \pmb{θ}_c|^2}, \end{equation*}\]
whereas the lens potential involves the exponential integral function $\mathrm{Ei}(x)$,
\[\begin{equation*} ψ(\pmb{θ}) = 2 κ_s θ_s^2 \left[ \ln\left( \frac{|\pmb{θ} - \pmb{θ}_c|}{θ_s} \right) - \frac{1}{2} \mathrm{Ei}\left( -\frac{|\pmb{θ} - \pmb{θ}_c|^2}{2 θ_s^2} \right) \right]. \end{equation*}\]
For $θ \gg θ_s$, the Gaussian lens behaves as a point mass lens of mass $M$.
In LensFactory, to define a Gaussian lens, the user needs to specify five parameters: its position in the image plane ($x_c,~y_c$), its mass ($M$), the scale radius ($x_s \equiv θ_s$), and the angular diameter distance to the lens ($D_d$). By default, the lens is placed at the origin, i.e., ($x_c,~y_c$) = (0, 0).
LensFactory.Lenses.init_GaussianLens — Type
init_GaussianLens(D_d::Real = NaN,
x_c::Real = 0.0,
y_c::Real = 0.0,
mass::Real = NaN,
x_s::Real = NaN)Initialize a Gaussian lens with the given parameters.
Keyword Arguments
D_d::Real = NaN: ADD from observer to lens (in $\rm \mathbf{meters}$).x_c::Real = 0.0: x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).y_c::Real = 0.0: y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).mass::Real= NaN: Mass of the lens (in $\rm \mathbf{M_\odot}$).x_s::Real = NaN: Scale radius, i.e., standard deviation of the Gaussian (in $\rm \mathbf{arcseconds}$).
LensFactory.Lenses.GaussianLens.potential! — Function
potential!(ψ::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:Real, S<:Real, T<:Real}potential!(ψ::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:ROA, S<:ROA, T<:Real}Calculate potential at given coordinates for a Gaussian lens and update the potential (ψ) in place. The lensing potential is given as,
\[ψ(θ_x, θ_y) = 2 \, κ_s \, θ_s^2 \left[ \ln\left( \frac{|\pmb{θ} - \pmb{θ}_c|}{θ_s} \right) - \frac{1}{2} \, \mathrm{Ei} \left(- \frac{|\pmb{θ} - \pmb{θ}_c|^2}{2 \, θ_s^2} \right) \right],\]
where $\mathrm{Ei}(x)$ is the exponential integral function.
Arguments
ψ: Potential at given coordinatesθx: x-coordinate(s) (in $\rm \mathbf{arcseconds}$).θy: y-coordinate(s) (in $\rm \mathbf{arcseconds}$).D_d: ADD from the observer to the lens (in $\rm \mathbf{meters}$).θxc: x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).θyc: y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).mass: Mass of the lens (in $\rm \mathbf{M_\odot}$).θs: Scale radius i.e., standard deviation of the Gaussian (in $\rm \mathbf{arcseconds}$).
Returns
nothing: Updates the potential (ψ) in place.
LensFactory.Lenses.GaussianLens.deflection! — Function
deflection!(ψx::U, ψy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:ROA, S<:Real, T<:Real}deflection!(ψx::U, ψy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:ROA, S<:ROA, T<:Real}Calculate deflection at given coordinates for a Gaussian lens and update the deflection components (ψx, ψy) in place.
Arguments
ψx: x-component of deflection at given coordinatesψy: y-component of deflection at given coordinatesθx: x-coordinate(s) (in $\rm \mathbf{arcseconds}$).θy: y-coordinate(s) (in $\rm \mathbf{arcseconds}$).D_d: ADD from the observer to the lens (in $\rm \mathbf{meters}$).θxc: x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).θyc: y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).mass: Mass of the lens (in $\rm \mathbf{M_\odot}$).θs: Scale radius i.e., standard deviation of the Gaussian (in $\rm \mathbf{arcseconds}$).
Returns
nothing: Updates the deflection (ψx, ψy) in place.
LensFactory.Lenses.GaussianLens.jacobian! — Function
jacobian!(ψxx::U, ψyy::U, ψxy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:Real, S<:Real, T<:Real}jacobian!(ψxx::U, ψyy::U, ψxy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T, θs::T) where {U<:ROA, S<:ROA, T<:Real}Calculate Jacobian at given coordinates for a Gaussian lens and update the jacobian components (ψxx, ψyy, ψxy) in place. The jacobian components are given as.
Arguments
ψxx: x-component of Jacobian at given coordinatesψyy: y-component of Jacobian at given coordinatesψxy: xy-component of Jacobian at given coordinatesθx: x-coordinate(s) (in $\rm \mathbf{arcseconds}$).θy: y-coordinate(s) (in $\rm \mathbf{arcseconds}$).D_d: ADD from the observer to the lens (in $\rm \mathbf{meters}$).θxc: x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).θyc: y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).mass: Mass of the lens (in $\rm \mathbf{M_\odot}$).θs: Scale radius i.e., standard deviation of the Gaussian (in $\rm \mathbf{arcseconds}$).
Returns
nothing: Updates the jacobian (ψxx, ψyy, ψxy) in place.