autogalaxy.profiles.mass_profiles.EllNFW#

class autogalaxy.profiles.mass_profiles.EllNFW(centre: Tuple[float, float] = (0.0, 0.0), elliptical_comps: Tuple[float, float] = (0.0, 0.0), kappa_s: float = 0.05, scale_radius: float = 1.0)[source]#
__init__(centre: Tuple[float, float] = (0.0, 0.0), elliptical_comps: Tuple[float, float] = (0.0, 0.0), kappa_s: float = 0.05, scale_radius: float = 1.0)[source]#

The elliptical NFW profiles, used to fit the dark matter halo of the lens.

Parameters
  • centre – The (y,x) arc-second coordinates of the profile centre.

  • elliptical_comps – The first and second ellipticity components of the elliptical coordinate system, (see the module autogalaxy -> convert.py for the convention).

  • kappa_s – The overall normalization of the dark matter halo (kappa_s = (rho_s * scale_radius)/lensing_critical_density)

  • scale_radius – The arc-second radius where the average density within this radius is 200 times the critical density of the Universe..

Methods

__init__([centre, elliptical_comps, …])

The elliptical NFW profiles, used to fit the dark matter halo of the lens.

area_within_tangential_critical_curve_from(grid)

Returns the surface area within the tangential critical curve, the calculation of whihc is described in the function tangential_critical_curve_from()

caustics_from(grid[, pixel_scale])

Returns the both the tangential and radial caustics of lensing object as a two entry list of irregular 2D grids.

concentration(redshift_profile, redshift_source)

concentration_func(concentration, …)

convergence_1d_from(grid[, …])

convergence_2d_from(grid)

Calculate the projected convergence at a given set of arc-second gridded coordinates.

convergence_2d_via_cse_from(grid)

Calculate the projected 2D convergence from a grid of (y,x) arc second coordinates, by computing and summing the convergence of each individual cse used to decompose the mass profile.

convergence_2d_via_hessian_from(grid[, buffer])

Returns the convergence of the lensing object, which is computed from the 2D deflection angle map via the Hessian using the expression (see equation 56 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

convergence_2d_via_jacobian_from(grid[, …])

Returns the convergence of the lensing object, which is computed from the 2D deflection angle map via the Jacobian using the expression (see equation 58 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

convergence_2d_via_mge_from(grid)

Calculate the projected convergence at a given set of arc-second gridded coordinates.

convergence_cse_1d_from(grid_radii, core_radius)

One dimensional function which is solved to decompose a convergence profile in cored steep ellipsoids, given by equation (14) of Oguri 2021 (https://arxiv.org/abs/2106.11464).

convergence_func(grid_radius)

convergence_func_gaussian(grid_radii, sigma, …)

coord_func(r)

coord_func_f(grid_radius)

coord_func_f_float_jit(grid_radius)

coord_func_f_jit(grid_radius, f)

coord_func_g(grid_radius)

coord_func_g_float_jit(grid_radius, f_r)

coord_func_g_jit(grid_radius, f_r, g)

coord_func_h(grid_radius)

cos_and_sin_to_x_axis()

Determine the sin and cosine of the angle between the profile’s ellipse and the positive x-axis, counter-clockwise.

critical_curves_from(grid[, pixel_scale])

Returns the both the tangential and radial critical curves of lensing object as a two entry list of irregular 2D grids.

decompose_convergence_via_cse([total_cses, …])

Decompose the convergence of the elliptical NFW mass profile into cored steep elliptical (cse) profiles.

decompose_convergence_via_mge()

deflection_func(u, y, x, npow, axis_ratio, …)

deflections_2d_via_cse_from(grid)

deflections_2d_via_integral_from(grid)

Calculate the deflection angles at a given set of arc-second gridded coordinates.

deflections_2d_via_mge_from(grid)

deflections_2d_via_potential_2d_from(grid)

deflections_via_cse_from(term1, term2, …)

Returns the deflection angles of a 1d cored steep ellisoid (CSE) profile, given by equation (19) and (20) of Oguri 2021 (https://arxiv.org/abs/2106.11464).

deflections_yx_2d_from(grid)

delta_concentration(redshift_object, …[, …])

density_between_circular_annuli(…)

Calculate the mass between two circular annuli and compute the density by dividing by the annuli surface area.

dict()

A dictionary representation of the instance comprising a type field which contains the entire class path by which the type can be imported and constructor arguments.

einstein_mass_angular_from(grid[, pixel_scale])

Returns the angular Einstein Mass, which is defined as:

einstein_radius_from(grid[, pixel_scale])

Returns the Einstein radius, which is defined as the radius of the circle which contains the same area as the area within the tangential critical curve.

einstein_radius_via_normalization_from(…)

eta(p)

see Eq.(6) of 1906.00263

eta_u(u, coordinates)

extract_attribute(cls, attr_name)

Returns an attribute of a class and its children profiles in the the galaxy as a ValueIrregular or Grid2DIrregular object.

from_axis_ratio_and_phi([centre, …])

from_dict(cls_dict)

Instantiate an instance of a class from its dictionary representation.

from_json(file_path)

Load the dictable object to a .json file, whereby all attributes are converted from the .json file’s dictionary representation to create the instance of the object

grid_angle_to_profile(grid_thetas)

The angle between each angle theta on the grid and the profile, in radians.

grid_to_eccentric_radii(grid)

Convert a grid of (y,x) coordinates to an eccentric radius, which is (1.0/axis_ratio) * elliptical radius and used to define light profile half-light radii using circular radii.

grid_to_elliptical_radii(grid)

Convert a grid of (y,x) coordinates to an elliptical radius.

grid_to_grid_cartesian(grid, radius)

Convert a grid of (y,x) coordinates with their specified circular radii to their original (y,x) Cartesian coordinates.

grid_to_grid_radii(grid)

Convert a grid of (y, x) coordinates to a grid of their circular radii.

hessian_from(grid[, buffer, deflections_func])

Returns the Hessian of the lensing object, where the Hessian is the second partial derivatives of the the potential (see equation 55 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

jacobian_from(grid)

Returns the Jacobian of the lensing object, which is computed by taking the gradient of the 2D deflection angle map in four direction (positive y, negative y, positive x, negative x).

kesi(p)

see Eq.(6) of 1906.08263

magnification_2d_from(grid)

Returns the 2D magnification map of lensing object, which is computed as the inverse of the determinant of the jacobian.

magnification_2d_via_hessian_from(grid[, …])

Returns the 2D magnification map of lensing object, which is computed from the 2D deflection angle map via the Hessian using the expressions (see equation 60 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

mass_angular_via_normalization_from(…)

mass_angular_within_circle_from(radius)

Integrate the mass profiles’s convergence profile to compute the total mass within a circle of specified radius.

mass_at_200_solar_masses(redshift_object, …)

mass_integral(x)

normalization_via_einstein_radius_from(…)

normalization_via_mass_angular_from(…[, …])

output_to_json(file_path)

Output the dictable object to a .json file, whereby all attributes are converted to a dictionary representation first.

potential_1d_from(grid[, radial_grid_shape_slim])

potential_2d_from(grid)

Calculate the potential at a given set of arc-second gridded coordinates.

potential_func(u, y, x, axis_ratio, kappa_s, …)

radial_caustic_from(grid[, pixel_scale])

Returns the radial caustic of lensing object, which is computed as follows:

radial_critical_curve_from(grid[, pixel_scale])

Returns the radial critical curve of lensing object, which is computed as follows:

radial_eigen_value_from(grid[, jacobian])

Returns the radial eigen values of lensing jacobian, which are given by the expression:

radial_projected_shape_slim_from(grid)

To make 1D plots (e.g.

radius_at_200(redshift_object, redshift_source)

rho_at_scale_radius_solar_mass_per_kpc3(…)

The Cosmic average density is defined at the redshift of the profile.

rotate_grid_from_reference_frame(grid)

Rotate a grid of (y,x) coordinates which have been transformed to the elliptical reference frame of a profile back to the original unrotated coordinate grid reference frame.

shear_yx_2d_via_hessian_from(grid[, buffer])

Returns the 2D (y,x) shear vectors of the lensing object, which are computed from the 2D deflection angle map via the Hessian using the expressions (see equation 57 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

shear_yx_2d_via_jacobian_from(grid[, jacobian])

Returns the 2D (y,x) shear vectors of the lensing object, which are computed from the 2D deflection angle map via the Jacobian using the expression (see equation 58 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

tabulate_integral(grid, tabulate_bins)

Tabulate an integral over the convergence of deflection potential of a mass profile.

tangential_caustic_from(grid[, pixel_scale])

Returns the tangential caustic of lensing object, which is computed as follows:

tangential_critical_curve_from(grid[, …])

Returns the tangential critical curve of lensing object, which is computed as follows:

tangential_eigen_value_from(grid[, jacobian])

Returns the tangential eigen values of lensing jacobian, which are given by the expression:

transform_grid_from_reference_frame(grid)

Transform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame, including a rotation to its original orientation and a translation from the profile’s centre.

transform_grid_to_reference_frame(grid)

Transform a grid of (y,x) coordinates to the reference frame of the profile, including a translation to its centre and a rotation to it orientation.

with_new_normalization(normalization)

zeta_from(grid, amps, sigmas, axis_ratio)

The key part to compute the deflection angle of each Gaussian.

Attributes

angle

average_convergence_of_1_radius

The radius a critical curve forms for this mass profile, e.g.

axis_ratio

cos_phi

ellipticity_rescale

epsrel

has_mass_profile

phi_radians

sin_phi