autogalaxy.profiles.mass_profiles.EllPowerLawCored#

class autogalaxy.profiles.mass_profiles.EllPowerLawCored(centre: Tuple[float, float] = (0.0, 0.0), elliptical_comps: Tuple[float, float] = (0.0, 0.0), einstein_radius: float = 1.0, slope: float = 2.0, core_radius: float = 0.01)[source]#
__init__(centre: Tuple[float, float] = (0.0, 0.0), elliptical_comps: Tuple[float, float] = (0.0, 0.0), einstein_radius: float = 1.0, slope: float = 2.0, core_radius: float = 0.01)[source]#

Represents a cored elliptical power-law density distribution

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).

  • einstein_radius – The arc-second Einstein radius.

  • slope – The density slope of the power-law (lower value -> shallower profile, higher value -> steeper profile).

  • core_radius – The arc-second radius of the inner core.

Methods

__init__([centre, elliptical_comps, …])

Represents a cored elliptical power-law density distribution

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.

convergence_1d_from(grid[, …])

convergence_2d_from(grid)

Calculate the projected convergence on a grid of (y,x) arc-second coordinates.

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_func(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.

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

deflections_2d_via_potential_2d_from(grid)

deflections_yx_2d_from(grid)

Calculate the deflection angles on a grid of (y,x) arc-second coordinates.

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_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).

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_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 on a grid of (y,x) arc-second coordinates.

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

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.

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):

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)

Attributes

angle

average_convergence_of_1_radius

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

axis_ratio

cos_phi

einstein_radius_rescaled

Rescale the einstein radius by slope and axis_ratio, to reduce its degeneracy with other mass-profiles parameters

ellipticity_rescale

has_mass_profile

phi_radians

sin_phi

unit_mass