coolest.api.profiles.mass#

Classes#

BaseMassProfile

Base class to define a mass profile to compute lensing quantities.

PEMD

Power-law Elliptical Mass Distribution (a.k.a. Elliptical Power-law)

SIE

Singular Isothermal Elliptical mass profile.

ExternalShear

Coordinates of the origin for the external shear profile are assumed to be (0., 0.).

ConvergenceSheet

Coordinates of the origin for the convergence sheet are assumed to be (0., 0.).

PixelatedRegularGridFullyDefined

Pixelated lens mass model defined a regular grid by its potential, derivatives and hessian arrays.

Module Contents#

class BaseMassProfile[source]#

Base class to define a mass profile to compute lensing quantities. Each specific class must be consistent with the equivalent class from the coolest.template submodule.

NOTE: in the future, a new coolest.profiles submodule will merge profile definitions that are currently split between coolest.template and coolest.api.

abstract evaluate_potential(**params)[source]#
abstract evaluate_deflection(**params)[source]#
abstract evaluate_convergence(**params)[source]#
abstract evaluate_hessian(**params)[source]#
property template_class[source]#
property type[source]#
property parameter_names[source]#
class PEMD[source]#

Power-law Elliptical Mass Distribution (a.k.a. Elliptical Power-law) This follows implementations in lenstronomy (:, Birrer et al. [BirrerShajibGilman+21]:) based on the formulae [TessoreMetcalf15]:.

param_conv(theta_E, q, gamma)[source]#
evaluate_potential(x, y, theta_E=1.0, gamma=2.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
evaluate_deflection(x, y, theta_E=1.0, gamma=2.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
evaluate_convergence(x, y, theta_E=1.0, gamma=2.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#

Returns the convergence (kappa) at the given position (x, y)

evaluate_hessian(x, y, theta_E=1.0, gamma=2.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
class SIE[source]#

Singular Isothermal Elliptical mass profile.

evaluate_potential(x, y, theta_E=1.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
evaluate_deflection(x, y, theta_E=1.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
evaluate_convergence(x, y, theta_E=1.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
evaluate_hessian(x, y, theta_E=1.0, phi=0.0, q=1.0, center_x=0.0, center_y=0.0)[source]#
class ExternalShear[source]#

Coordinates of the origin for the external shear profile are assumed to be (0., 0.).

evaluate_potential(x, y, gamma_ext=0.0, phi_ext=0.0)[source]#
evaluate_deflection(x, y, gamma_ext=0.0, phi_ext=0.0)[source]#
evaluate_convergence(x, y, gamma_ext=0.0, phi_ext=0.0)[source]#
evaluate_hessian(x, y, gamma_ext=0.0, phi_ext=0.0)[source]#
class ConvergenceSheet[source]#

Coordinates of the origin for the convergence sheet are assumed to be (0., 0.).

evaluate_potential(x, y, kappa_s=0.0)[source]#
evaluate_deflection(x, y, kappa_s=0.0)[source]#
evaluate_convergence(x, y, kappa_s=0.0)[source]#
evaluate_hessian(x, y, kappa_s=0.0)[source]#
class PixelatedRegularGridFullyDefined(field_of_view_x, field_of_view_y, num_pix_x, num_pix_y, interpolation_method='cubic')[source]#

Pixelated lens mass model defined a regular grid by its potential, derivatives and hessian arrays.

potantial(pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#

Returns the lensing potential

evaluate_potential(x, y, pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#
deflection(pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#

Returns the deflection angles

evaluate_deflection(x, y, pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#
convergence(pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#

Returns the deflection angles

evaluate_convergence(x, y, pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#

Returns the deflection angles

hessian(pixels_hessian=None)[source]#

Returns the deflection angles

evaluate_hessian(x, y, pixels=None, pixels_derivative=None, pixels_hessian=None)[source]#
get_extent()[source]#
get_coordinates()[source]#