Point Lens
Arguably, the simplest gravitational lens is a point mass lens (i.e., Schwarzschild lens). The lensing by a given point mass lens is characterized by two parameters: its mass ($M$) and the source position ($\boldsymbol{\beta}$). The corresponding lens potential is given by
\[\begin{equation*} ψ(\pmb{θ}) = \frac{4{\rm G} M} {\rm c^2} \frac{1}{D_d} \ln \left|\pmb{θ} - \pmb{θ}_c\right|, \end{equation*}\]
where $\pmb{θ}_c$ represents the point mass lens center, leading to the deflection angle
\[\begin{equation*} \pmb{α}(\pmb{θ}) = \frac{4{\rm G} M} {\rm c^2} \frac{1}{D_d} \frac{\pmb{θ} - \pmb{θ}_c}{|\pmb{θ} - \pmb{θ}_c|^2}. \end{equation*}\]
A source located at $\pmb{β} = \pmb{θ}_c$ (i.e., perfectly aligned with the lens) is imaged as a ring of angular radius equal to the Einstein angle,
\[\begin{equation*} θ_E = \sqrt{\frac{4{\rm G} M}{{\rm c}^2} \frac{D_{ds}}{D_d D_s}}, \end{equation*}\]
which sets the characteristic angular scale of the lens. For any other source position, the point mass lens always produces two images, one on either side of the lens center.
In LensFactory, to define a point lens, the user need to specify four parameters: its position in the image plane ($x_c,~y_c$), its mass ($M$) 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). From above, to initialize a point lens, we need to first define a cosmology and calculate the angular diameter distance to the lens. We refer reader to Basic: Example - 2 for more details.
LensFactory.Lenses.init_PointLens — Type
init_PointLens(D_d::Real = NaN,
x_c::Real = 0.0,
y_c::Real = 0.0,
mass::Real = NaN)Initialize a point 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}$).
LensFactory.Lenses.PointLens.potential! — Function
potential!(ψ::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T) where {U<:Real, S<:Real, T <: Real}potential!(ψ::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T) where {U<:ROA, S<:ROA, T<:Real}Calculate potential at given coordinates for a point mass lens and update the potential (ψ) in place.
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}$).
Returns
nothing: Updates the potential (ψ) in place.
LensFactory.Lenses.PointLens.deflection! — Function
deflection!(ψx::U, ψy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T) where {U<:Real, S<:Real, T<:Real}deflection!(ψx::U, ψy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::T) where {U<:ROA, S<:ROA, T<:Real}Calculate deflection at given coordinates for a point mass lens and update the deflection components (ψx, ψy) in place.
Arguments
ψx: x-component of the deflection at given coordinatesψy: y-component of the 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}$).
Returns
nothing: Updates the deflection (ψx, ψy) in place.
LensFactory.Lenses.PointLens.jacobian! — Function
jacobian!(ψxx::U, ψyy::U, ψxy::U, θx::S, θy::S, D_d::T, θxc::T, θyc::T, mass::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) where {U<:ROA, S<:ROA, T<:Real}Calculate jacobian at given coordinates for a point mass lens and update the jacobian components (ψxx, ψyy, ψxy) in place.
Arguments
ψxx: x-component of the jacobian at given coordinatesψyy: y-component of the jacobian at given coordinatesψxy: xy-component of the 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}$).
Returns
nothing: Updates the jacobian (ψxx, ψyy, ψxy) in place.
LensFactory.Lenses.PointLens.einstein_angle — Function
einstein_angle(; D_d::Real = NaN,
D_ds::Real = NaN,
D_s::Real = NaN,
mass::Real = NaN)Calculate the Einstein angle for a point mass lens,
\[\theta_E = \sqrt{\frac{4 \, \rm{G} \, M}{\rm{c}^2} \frac{D_{ds}}{D_d D_s}}.\]
Keyword Arguments
D_d: ADD from observer to lens (in $\rm \mathbf{meters}$).D_ds: ADD from lens to source (in $\rm \mathbf{meters}$).D_s: ADD from observer to source (in $\rm \mathbf{meters}$).mass: Mass of the lens (in $\rm \mathbf{M_\odot}$).
Returns
θE: Einstein angle (in $\rm \mathbf{arcseconds}$)