autogalaxy.profiles.mass.Isothermal#
- class Isothermal[source]#
Bases:
PowerLawRepresents an elliptical isothermal density distribution, which is equivalent to the elliptical power-law density distribution for the value slope = 2.0.
- Parameters:
Methods
angleThe 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_radiansThe 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).
angle_to_profile_grid_fromThe angle between each angle theta on the grid and the profile, in radians.
The ratio of the minor-axis to major-axis (b/a) of the ellipse defined by profile (0.0 > q > 1.0).
convergence_2d_fromReturns the two dimensional projected convergence on a grid of (y,x) arc-second coordinates.
Returns the convergence of the mass profile as a function of the radial coordinate.
deflection_funcdeflections_2d_via_potential_2d_fromReturns the 2D deflection angles of the mass profile by numerically differentiating the lensing potential on the input grid.
Calculate the deflection angles on a grid of (y,x) arc-second coordinates.
density_between_circular_annuliCalculate the mass between two circular annuli and compute the density by dividing by the annuli surface area.
eccentric_radii_grid_fromConvert a grid of (y,x) coordinates to an eccentric radius: :math: axis_ratio^0.5 (x^2 + (y^2/q))^0.5
einstein_radius_rescaledRescale the einstein radius by slope and axis_ratio, to reduce its degeneracy with other mass-profiles parameters.
elliptical_radii_grid_fromConvert a grid of (y,x) coordinates to their elliptical radii values: :math: (x^2 + (y^2/q))^0.5
ellipticity_rescaleA rescaling factor applied to account for the ellipticity of the mass profile when computing the Einstein radius from the average convergence equals unity criterion.
extract_attributeReturns an attribute of a class and its children profiles in the galaxy as a ValueIrregular or Grid2DIrregular object.
hasReturns True if any attribute of this profile is an instance of the input class cls, else False.
mass_angular_within_circle_fromIntegrate the mass profiles's convergence profile to compute the total mass within a circle of specified radius.
mass_integralIntegrand used by mass_angular_within_circle_from to compute the total projected mass within a circle.
potential_2d_fromCalculate the potential on a grid of (y,x) arc-second coordinates.
potential_funcReturns the integrand of the lensing potential at a single point, used in numerical integration schemes for computing the potential from the mass profile's convergence.
radial_deflection_fromradial_grid_fromConvert a grid of (y, x) coordinates, to their radial distances from the profile centre (e.g. :math: r = sqrt(x**2 + y**2)).
rotated_grid_from_reference_frame_fromRotate 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.
Returns the analytic 2D weak-lensing shear vector field \((\gamma_2, \gamma_1)\) of the elliptical isothermal mass distribution on a grid of
(y, x)arc-second coordinates.transformed_from_reference_frame_grid_fromTransform a grid of (y,x) coordinates from the reference frame of the profile to the original observer reference frame.
transformed_to_reference_frame_grid_fromTransform a grid of (y,x) coordinates to the reference frame of the profile.
vmapped_deflections_fromAttributes
average_convergence_of_1_radiusThe radius a critical curve forms for this mass profile, e.g. where the mean convergence is equal to 1.0.
unit_mass- axis_ratio(xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>)[source]#
The ratio of the minor-axis to major-axis (b/a) of the ellipse defined by profile (0.0 > q > 1.0).
- deflections_yx_2d_from(grid, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Calculate the deflection angles on a grid of (y,x) arc-second coordinates.
- Parameters:
grid (
Union[ndarray,Grid2D,Grid2DIrregular]) – The grid of (y,x) arc-second coordinates the deflection angles are computed on.
- shear_yx_2d_from(grid, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>, **kwargs)[source]#
Returns the analytic 2D weak-lensing shear vector field \((\gamma_2, \gamma_1)\) of the elliptical isothermal mass distribution on a grid of
(y, x)arc-second coordinates.For an axis-aligned isothermal profile centred on the origin the shear components reduce to:
\[ \begin{align}\begin{aligned}\gamma_1 = -\kappa(\theta) \, \frac{x^2 - y^2}{x^2 + y^2}\\\gamma_2 = -2 \, \kappa(\theta) \, \frac{x \, y}{x^2 + y^2}\end{aligned}\end{align} \]where \(\kappa(\theta)\) is the convergence at the rotated grid coordinate. After evaluation in the profile’s reference frame the shear vector field is rotated back into the original frame using the
2 * anglerotation appropriate for a spin-2 quantity (the shear transforms as a spin-2 field, so a coordinate rotation byanglerotates the components by2 * angle).This analytic path is mathematically equivalent to
LensCalc.shear_yx_2d_via_hessian_from, which derives the same shear from finite-difference (or JAX) derivatives ofdeflections_yx_2d_from. The cross-check is exercised intest_autogalaxy/profiles/mass/total/test_isothermal.py::test__shear_yx_2d_from__matches_via_hessian.
- convergence_func(grid_radius, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautogalaxy/envs/latest/lib/python3.11/site-packages/numpy/__init__.py'>)[source]#
Returns the convergence of the mass profile as a function of the radial coordinate.
This is used to integrate the convergence profile to compute enclosed masses and the Einstein radius.