Pixel Lens

The pixel lens is the simplest extended mass element one can construct: a square tile of constant surface mass density. Its surface mass density is

\[\begin{equation*} Σ(\pmb{θ}) = \begin{cases} κ \, Σ_{\rm cr}, & |θ_x - θ_{xc}| \le a/2 \ \ \text{and} \ \ |θ_y - θ_{yc}| \le a/2, \\[4pt] 0, & \text{otherwise}, \end{cases} \end{equation*}\]

where $\pmb{θ}_c = (θ_{xc},~θ_{yc})$ is the centre of the tile, $a$ is its side length, and $κ$ is the dimensionless convergence expressed in units of the critical surface density $Σ_{\rm cr}$ for sources at infinity. The tile is fully specified by these three numbers, and the mass it contains is simply

\[\begin{equation*} M = κ \, Σ_{\rm cr} \, \left(a \, D_d\right)^2 . \end{equation*}\]

Unlike the other lenses in LensFactory, the pixel lens has a sharp boundary and is uniform inside it. It is therefore not intended as a description of any physical object on its own; its usefulness comes from the fact that it is an exactly integrable building block out of which arbitrary mass distributions can be assembled.

With the normalization used throughout LensFactory, the lens potential of an arbitrary convergence distribution is

\[\begin{equation*} ψ(\pmb{θ}) = \frac{1}{π} \int κ(\pmb{θ}') \, \ln \left|\pmb{θ} - \pmb{θ}'\right| \, {\rm d}^2 θ', \end{equation*}\]

so that $\nabla^2 ψ = 2 κ$ and $\pmb{α} = \nabla ψ$. For a uniform square the integrand is separable in Cartesian coordinates over a rectangular domain, and the integral can be evaluated in closed form. It is convenient to introduce the offsets of the field point from the four pixel edges,

\[\begin{equation*} u_{1,2} = θ_x - θ_{xc} \pm \frac{a}{2}, \qquad v_{1,2} = θ_y - θ_{yc} \pm \frac{a}{2}, \end{equation*}\]

together with the alternating corner sum

\[\begin{equation*} \mathcal{D}\left[f\right] \equiv \sum_{i=1}^{2} \sum_{j=1}^{2} (-1)^{i+j} f(u_i, v_j) = f(u_1, v_1) - f(u_1, v_2) - f(u_2, v_1) + f(u_2, v_2). \end{equation*}\]

Every quantity below is obtained by evaluating one elementary function at the four corners of the pixel and combining them with $\mathcal{D}$. The lens potential is

\[\begin{equation*} ψ(\pmb{θ}) = \frac{κ}{2π} \, \mathcal{D}\!\left[\, u v \ln\left(u^2 + v^2\right) - 3 u v + u^2 \arctan\!\left(\frac{v}{u}\right) + v^2 \arctan\!\left(\frac{u}{v}\right) \right]. \end{equation*}\]

The deflection components are,

\[\begin{align*} α_x(\pmb{θ}) &= \frac{κ}{2π} \, \mathcal{D}\!\left[\, v \ln\left(u^2 + v^2\right) + 2 u \arctan\!\left(\frac{v}{u}\right) \right], \\ α_y(\pmb{θ}) &= \frac{κ}{2π} \, \mathcal{D}\!\left[\, u \ln\left(u^2 + v^2\right) + 2 v \arctan\!\left(\frac{u}{v}\right) \right]. \end{align*}\]

Finally, the deformation tensor components are

\[\begin{align*} ψ_{xx}(\pmb{θ}) &= \frac{κ}{π} \, \mathcal{D}\!\left[\arctan\!\left(\frac{v}{u}\right)\right], \\ ψ_{yy}(\pmb{θ}) &= \frac{κ}{π} \, \mathcal{D}\!\left[\arctan\!\left(\frac{u}{v}\right)\right], \\ ψ_{xy}(\pmb{θ}) &= \frac{κ}{2π} \, \mathcal{D}\!\left[\ln\left(u^2 + v^2\right)\right]. \end{align*}\]

Because all of the expressions above are linear in $κ$, a grid of such tiles with independent convergences is the standard starting point for free-form (non-parametric) mass reconstruction, where the observed image positions become linear constraints on the pixel values (Abdelsalam et al., 1998). See Multi-Pixel Lens, which evaluates the same expressions for a vector of pixel centres and convergences.

LensFactory.Lenses.init_PixelLens — Type
init_PixelLens(x_c::Real        = 0.0, 
               y_c::Real        = 0.0, 
               kappa::Real      = NaN,
               pixel_size::Real = NaN)

Initialize a square pixel lens with the given parameters.

Keyword Arguments

  • 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}$).
  • kappa::Real = NaN: Convergence (dimensionless).
source
LensFactory.Lenses.PixelLens.potential! — Function
potential!(ψ::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:Real, S<:Real, T<:Real}
source
potential!(ψ::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:ROA, S<:ROA, T<:Real}

Calculate potential at given coordinates for a pixel 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}$).
  • θxc : x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • θyc : y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • κ : Convergence value (assuming $D_{ds}/D_s = 1$).
  • θpix: Pixel size (in $\rm \mathbf{arcseconds}$).

Returns

  • nothing: Updates the potential (ψ) in place.
source
LensFactory.Lenses.PixelLens.deflection! — Function
deflection!(ψx::U, ψy::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:Real, S<:Real, T<:Real}
source
deflection!(ψx::U, ψy::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:ROA, S<:ROA, T<:Real}

Calculate deflection at given coordinates for a pixel 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}$).
  • θxc : x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • θyc : y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • κ : Convergence value (assuming $D_{ds}/D_s = 1$).
  • θpix: Pixel size (in $\rm \mathbf{arcseconds}$).

Returns

  • nothing: Updates the deflection (ψx, ψy) in place.
source
LensFactory.Lenses.PixelLens.jacobian! — Function
jacobian!(ψxx::U, ψyy::U, ψxy::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:Real, S<:Real, T<:Real}
source
jacobian!(ψxx::U, ψyy::U, ψxy::U, θx::S, θy::S, θxc::T, θyc::T, κ::T, θpix::T) where {U<:ROA, S<:ROA, T<:Real}

Calculate jacobian at given coordinates for a pixel 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}$).
  • θxc : x-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • θyc : y-coordinate of the lens (in $\rm \mathbf{arcseconds}$).
  • κ : Convergence value (assuming $D_{ds}/D_s = 1$).
  • θpix: Pixel size (in $\rm \mathbf{arcseconds}$).

Returns

  • nothing: Updates the jacobian (ψxx, ψyy, ψxy) in place.
source