Sources

LensFactory.Sources.disk — Function
disk(θ_x::Matrix{<:RV}, θ_y::Matrix{<:RV}, θ_r::RV, β::NTuple{2, RV}; A::RV=1.0)

Creates a disk source profile of radius $θ_r$ on a grid defined by $[θ_x, θ_y]$. The center of the disk is at $\pmb{β} = (β_x, β_y)$. By default, the source profile is constant and every pixel has a value of 1.0 and we can scale it using the amplitude $A$. The corresponding formula is:

\[S(θ_x, θ_y) = \begin{cases} A, & \text{if } (θ_x - β_x)^2 + (θ_y - β_y)^2 ≤ θ_r^2 \\ 0, & \text{otherwise} \end{cases}\]

Arguments

  • θ_x::Matrix{<:RV}: x-grid (in $\rm \mathbf{arcseconds}$).
  • θ_y::Matrix{<:RV}: y-grid (in $\rm \mathbf{arcseconds}$).
  • θ_r::RV: Radius of the disk (in $\rm \mathbf{arcseconds}$).
  • β::NTuple{2, RV}: Center of the disk (in $\rm \mathbf{arcseconds}$).

Keyword Arguments

  • A::RV: Amplitude of the disk (in $\rm \mathbf{arcseconds}$).

Returns

  • src::Matrix{<:RV}: Source profile on a grid defined by $[θ_x, θ_y]$.
source
LensFactory.Sources.gaussian — Function
gaussian(θ_x::Matrix{<:RV}, θ_y::Matrix{<:RV}, σ_x::RV, σ_y::RV, β::NTuple{2, RV}; A::RV=1.0)

Creates a Gaussian source profile on a grid defined by $[θ_x, θ_y]$. Standard deviations along $(x, y)$ axis are given by $(σ_x, σ_y)$. The center of the Gaussian is at $\pmb{β} = (β_x, β_y)$. The overall normalization is determined by $A$. The corresponding formula is:

\[S(θ_x, θ_y) = \frac{A}{2 π σ_x σ_y} \exp\left[-\frac{1}{2} \left(\frac{(θ_x - β_x)^2}{σ_x^2} + \frac{(θ_y - β_y)^2}{σ_y^2}\right)\right]\]

Arguments

  • θ_x::Matrix{<:RV}: x-grid (in $m \mathbf{arcseconds}$).
  • θ_y::Matrix{<:RV}: y-grid (in $m \mathbf{arcseconds}$).
  • σ_x::RV: Standard deviation along the x-axis (in $m \mathbf{arcseconds}$).
  • σ_y::RV: Standard deviation along the y-axis (in $m \mathbf{arcseconds}$).
  • β::NTuple{2, RV}: Center of the Gaussian (in $m \mathbf{arcseconds}$).

Keyword Arguments

  • A::RV: Amplitude of the Gaussian (in $m \mathbf{arcseconds}$).

Returns

  • src::Matrix{<:RV}: Source profile on a grid defined by $[θ_x, θ_y]$.
source
LensFactory.Sources.sersic — Function
sersic(θ_x::Matrix{<:RV}, θ_y::Matrix{<:RV}, n::RV, θ_e::RV, β::NTuple{2, RV}; A::RV=1.0)

Creates a Sersic source profile on a grid defined by $[θ_x, θ_y]$. The Sersic index is given by $n$ and the effective radius is given by $θ_e$. The center of the Sersic profile is at $\pmb{β} = (β_x, β_y)$. The overall normalization is determined by $A$. The corresponding formula is:

\[S(θ_x, θ_y) = \frac{A \,b_n^{2n}}{π θ_e^2 \, Γ(2n+1)} \exp\left[-b_n \left(\frac{\sqrt{(θ_x - β_x)^2 + (θ_y - β_y)^2}}{θ_e}\right)^{1/n}\right],\]

where,

\[b_n = \begin{cases} 0.01945 - 0.8902\:n + 10.95\:n^2 - 19.67\:n^3 + 13.43\:n^4, & 0.06 < n < 0.36 \\ 2n - \frac{1}{3} + \frac{4}{405\:n} + \frac{46}{25515\:n^2} + \frac{131}{1148175\:n^3} - \frac{2194697}{30690717750\:n^4}, & n > 0.36 \end{cases}\]

Arguments

  • θ_x::Matrix{<:RV}: x-grid (in $\rm \mathbf{arcseconds}$).
  • θ_y::Matrix{<:RV}: y-grid (in $\rm \mathbf{arcseconds}$).
  • n::RV: Sersic index.
  • θ_e::RV: Effective radius (in $\rm \mathbf{arcseconds}$).
  • β::NTuple{2, RV}: Center of the Sersic profile (in $\rm \mathbf{arcseconds}$).

Keyword Arguments

  • A::RV: Amplitude of the Sersic profile (in $\rm \mathbf{arcseconds}$).

Returns

  • src::Matrix{<:RV}: Source profile on a grid defined by $[θ_x, θ_y]$.
source