PyAutoLens
PyAutoLens copied to clipboard
Hernquist Light Profile
The following seminar work of Hernquist details a light profile called the Hernquist profile:
https://ui.adsabs.harvard.edu/abs/1990ApJ...356..359H/abstract
The intensity calculation for a spherical model is given by equations (32-35):

It would be good to implement this light profile in the module autogalaxy.profiles.light_profiles:
https://github.com/Jammy2211/PyAutoGalaxy/blob/master/autogalaxy/profiles/light_profiles.py
A template for the profile is as follows:
class SpHernquist(LightProfile):
def __init__(
self,
centre: Tuple[float, float] = (0.0, 0.0),
another_parameter: float = 1.0,
):
"""
The spherical Hernquist profile, used to fit the light of galaxies.
Parameters
----------
centre
The (y,x) arc-second coordinates of the profile centre.
"""
super().__init__(
centre=centre,
elliptical_comps=(0.0, 0.0),
)
def image_2d_from_grid_radii(self, grid_radii):
"""
Calculate the intensity of the Hernquist light profile on a grid of radial coordinates.
Parameters
----------
grid_radii : float
The radial distance from the centre of the profile. for each coordinate on the grid.
"""
return expression_for_projected_intensity
# For new users: These decorators perform geometric transformation of the input grid using its `centre`.
@grid_decorators.grid_2d_to_structure
@grid_decorators.transform
@grid_decorators.relocate_to_radial_minimum
def image_2d_from_grid(self, grid, grid_radial_minimum=None):
"""Calculate the intensity of the light profile on a grid of Cartesian (y,x) coordinates.
If the coordinates have not been transformed to the profile's geometry, this is performed automatically.
Parameters
----------
grid
The (y, x) coordinates in the original reference frame of the grid.
"""
return self.image_2d_from_grid_radii(self.grid_to_eccentric_radii(grid))