Available Mass and Light Profiles#
All parameterizable profiles implement Parameterized
.
- class gigalens.profile.Parameterized(*args, **kwargs)[source]#
Interface for a parameterized profile of any kind.
Mass Profiles#
All mass profiles must implement MassProfile
, which essentially requires the definition of the deflection
angle.
- class gigalens.profile.MassProfile(*args, **kwargs)[source]#
Interface for a mass profile.
- abstract deriv(x, y, **kwargs)[source]#
Calculates deflection angle.
- Parameters
x – \(x\) coordinate at which to evaluate the deflection
y – \(y\) coordinate at which to evaluate the deflection
**kwargs – Mass profile parameters. Each parameter must be shaped in a way that is broadcastable with x and y
- Returns
A tuple \((\alpha_x, \alpha_y)\) containing the deflection angle in the \(x\) and \(y\) directions
Tensorflow Implementations
- class gigalens.tf.profiles.mass.epl.EPL(niter=50)[source]#
The elliptical power law mass profile, calculated iteratively as in [TM15].
JAX Implementations
Light Profiles#
Any light profile must implement LightProfile
, which requires
the light amplitude to be defined.
- class gigalens.profile.LightProfile(use_lstsq=False, *args, **kwargs)[source]#
Interface for a light profile.
- Keyword Arguments
use_lstsq (bool) – Whether to use least squares to solve for linear parameters
Tensorflow Implementations
- class gigalens.tf.profiles.light.sersic.Sersic(use_lstsq=False, *args, **kwargs)[source]#
A spherically symmetric Sersic light profile.
\[I(x,y) = I_e \exp\left(-b_n \left(\left(\frac{D(x,y)}{R_s}\right)^{1/n} - 1\right)\right)\]where \(D(x,y)\) is the distance function (as defined in
distance()
). In the simplest case, it is just Euclidean distance from the center, and when ellipticity is non-zero, the coordinate axes are translated, rotated and scaled to match the ellipse defined by the complex ellipticities(e1,e2)
with center(center_x, center_y)
then the Euclidean distance from the center is calculated. If least squares is not being used, the amplitude \(I_e\) is set to be 1.- distance(x, y, cx, cy, e1=None, e2=None)[source]#
- Parameters
x – The \(x\) coordinates to evaluate the distance function at
y – The \(y\) coordinates to evaluate the distance function at
cx – The \(x\) coordinate of the center of the Sersic light component
cy – The \(y\) coordinate of the center of the Sersic light component
e1 – Complex ellipticity component. If unspecified, it is assumed to be zero.
e2 – Complex ellipticity component. If unspecified, it is assumed to be zero.
- Returns
The distance function evaluated at
(x,y)
- class gigalens.tf.profiles.light.shapelets.Shapelets(n_max, use_lstsq=False, interpolate=True)[source]#
A flexible light profile using a Hermite polynomial basis. If interpolate is set to True, will precalculate the Hermite polynomial and interpolate between precalculated values. Otherwise, the Hermite polynomials will be evaluated at every call of Shapelets.function()