# autogalaxy.profiles.mass.NFWSph#

class NFWSph[source]#

Bases: `NFW`

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

Parameters:

Methods

 `angle_to_profile_grid_from` The angle between each angle theta on the grid and the profile, in radians. `area_within_curve_list_from` rtype: `concentration` Computes the NFW halo concentration, c_{200m} `concentration_func` `convergence_1d_from` rtype: `convergence_2d_from` Calculate the projected convergence at a given set of arc-second gridded coordinates. `convergence_2d_via_cse_from` 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` 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://inspirehep.net/literature/419263): `convergence_2d_via_jacobian_from` 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://inspirehep.net/literature/419263): `convergence_2d_via_mge_from` Calculate the projected convergence at a given set of arc-second gridded coordinates. `convergence_cse_1d_from` 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` rtype: `float` `convergence_func_gaussian` `coord_func` `coord_func_f` `coord_func_f_jit` `coord_func_g` `coord_func_g_jit` `coord_func_h` `decompose_convergence_via_cse` Decompose the convergence of the elliptical NFW mass profile into cored steep elliptical (cse) profiles. `decompose_convergence_via_mge` `deflection_func` `deflection_func_sph` `deflections_2d_via_analytic_from` Calculate the deflection angles at a given set of arc-second gridded coordinates. `deflections_2d_via_cse_from` `deflections_2d_via_integral_from` Calculate the deflection angles at a given set of arc-second gridded coordinates. `deflections_2d_via_mge_from` `deflections_2d_via_potential_2d_from` `deflections_via_cse_from` 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` `delta_concentration` `density_between_circular_annuli` Calculate the mass between two circular annuli and compute the density by dividing by the annuli surface area. `eccentric_radii_grid_from` Convert a grid of (y,x) coordinates to an eccentric radius: :math: axis_ratio^0.5 (x^2 + (y^2/q))^0.5 `einstein_mass_angular_from` Returns the Einstein radius corresponding to the area within the tangential critical curve. `einstein_mass_angular_list_from` Returns a list of the angular Einstein massses corresponding to the area within each tangential critical curve. `einstein_radius_from` Returns the Einstein radius corresponding to the area within the tangential critical curve. `einstein_radius_list_from` Returns a list of the Einstein radii corresponding to the area within each tangential critical curve. `elliptical_radii_grid_from` Convert a grid of (y,x) coordinates to their elliptical radii values: :math: (x^2 + (y^2/q))^0.5 `eta` see Eq.(6) of 1906.00263 `extract_attribute` Returns an attribute of a class and its children profiles in the galaxy as a ValueIrregular or Grid2DIrregular object. `has` Does this instance have an attribute which is of type cls? `hessian_from` Returns the Hessian of the lensing object, where the Hessian is the second partial derivatives of the potential (see equation 55 https://inspirehep.net/literature/419263): `jacobian_from` 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` see Eq.(6) of 1906.08263 `magnification_2d_from` 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` 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://inspirehep.net/literature/419263): `mass_angular_within_circle_from` Integrate the mass profiles's convergence profile to compute the total mass within a circle of specified radius. `mass_at_200_solar_masses` Returns M_{200m} of this NFW halo, in solar masses, at the given cosmology. `mass_integral` `potential_1d_from` rtype: `potential_2d_from` Calculate the potential at a given set of arc-second gridded coordinates. `potential_func` `potential_func_sph` `radial_caustic_list_from` Returns all radial caustics of the lensing system, which are computed as follows: `radial_critical_curve_area_list_from` Returns the surface area within each radial critical curve as a list, the calculation of which is described in the function radial_critical_curve_list_from(). `radial_critical_curve_list_from` Returns all radial critical curves of the lensing system, which are computed as follows: `radial_eigen_value_from` Returns the radial eigen values of lensing jacobian, which are given by the expression: `radial_grid_from` Convert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g. `radius_at_200` Returns r_{200m} for this halo in arcseconds `rho_at_scale_radius_solar_mass_per_kpc3` The Cosmic average density is defined at the redshift of the profile. `rotated_grid_from_reference_frame_from` 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` 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://inspirehep.net/literature/419263): `shear_yx_2d_via_jacobian_from` 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://inspirehep.net/literature/419263): `tabulate_integral` Tabulate an integral over the convergence of deflection potential of a mass profile. `tangential_caustic_list_from` Returns all tangential caustics of the lensing system, which are computed as follows: `tangential_critical_curve_area_list_from` Returns the surface area within each tangential critical curve as a list, the calculation of which is described in the function tangential_critical_curve_list_from(). `tangential_critical_curve_list_from` Returns all tangential critical curves of the lensing system, which are computed as follows: `tangential_eigen_value_from` Returns the tangential eigen values of lensing jacobian, which are given by the expression: `transformed_from_reference_frame_grid_from` Transform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame. `transformed_to_reference_frame_grid_from` Transform a grid of (y,x) coordinates to the reference frame of the profile. `zeta_from` The key part to compute the deflection angle of each Gaussian.

Attributes

 `angle` The position angle in degrees of the major-axis of the ellipse defined by profile, defined counter clockwise from the positive x-axis (0.0 > angle > 180.0). `angle_radians` The position angle in radians of the major-axis of the ellipse defined by profile, defined counter clockwise from the positive x-axis (0.0 > angle > 2pi). `average_convergence_of_1_radius` The radius a critical curve forms for this mass profile, e.g. `axis_ratio` The ratio of the minor-axis to major-axis (b/a) of the ellipse defined by profile (0.0 > q > 1.0). `ellipticity_rescale` `epsrel`
deflections_2d_via_analytic_from(grid)[source]#

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

Parameters:

grid (`Union`[`ndarray`, `Grid2D`, `Grid2DIterate`, `Grid2DIrregular`]) – The grid of (y,x) arc-second coordinates the deflection angles are computed on.

potential_2d_from(grid)[source]#

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

Parameters:

grid (`Union`[`ndarray`, `Grid2D`, `Grid2DIterate`, `Grid2DIrregular`]) – The grid of (y,x) arc-second coordinates the deflection angles are computed on.