Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed May 25, 2024
1 parent 9f7c0fa commit 6ab2d21
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions lenstronomy/LightModel/Profiles/hernquist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Hernquist(object):
"""Class for pseudo Jaffe lens light (2d projected light/mass distribution."""
"""Class for Hernquist lens light (2d projected light/mass distribution)."""

def __init__(self):
from lenstronomy.LensModel.Profiles.hernquist import Hernquist as Hernquist_lens
Expand All @@ -28,23 +28,23 @@ def __init__(self):
def function(self, x, y, amp, Rs, center_x=0, center_y=0):
"""
:param x:
:param y:
:param amp:
:param x: x-position
:param y: y-position
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:param center_x:
:param center_y:
:return:
:param center_x: centroid in x-direction
:param center_y: centroid in y-direction
:return: surface brightness
"""
rho0 = self.lens.sigma2rho(amp, Rs)
return self.lens.density_2d(x, y, rho0, Rs, center_x, center_y)

def light_3d(self, r, amp, Rs):
"""
:param r:
:param amp:
:param Rs:
:param r: 3d radius (in angular units)
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:return:
"""
rho0 = self.lens.sigma2rho(amp, Rs)
Expand All @@ -54,9 +54,9 @@ def light_3d(self, r, amp, Rs):
def total_flux(amp, Rs):
"""
:param amp:
:param Rs:
:return:
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:return: total integrated flux of profile
"""
rhos = amp / Rs
m_tot = 2 * np.pi * rhos * Rs ** 3
Expand Down Expand Up @@ -94,15 +94,15 @@ def __init__(self):
def function(self, x, y, amp, Rs, e1, e2, center_x=0, center_y=0):
"""
:param x:
:param y:
:param amp:
:param Rs:
:param e1:
:param e2:
:param center_x:
:param center_y:
:return:
:param x: x-position
:param y: y-position
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:param e1: eccentricity component
:param e2: eccentricity component
:param center_x: centroid in x-direction
:param center_y: centroid in y-direction
:return: surface brightness
"""
x_, y_ = param_util.transform_e1e2_product_average(
x, y, e1, e2, center_x, center_y
Expand All @@ -112,23 +112,23 @@ def function(self, x, y, amp, Rs, e1, e2, center_x=0, center_y=0):
def light_3d(self, r, amp, Rs, e1=0, e2=0):
"""
:param r:
:param amp:
:param Rs:
:param e1:
:param e2:
:return:
:param r: 3d radius (in angular units)
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:param e1: eccentricity component
:param e2: eccentricity component
:return: flux density in 3d
"""
rho0 = self.lens.sigma2rho(amp, Rs)
return self.lens.density(r, rho0, Rs)

def total_flux(self, amp, Rs, e1=0, e2=0):
"""
:param amp:
:param Rs:
:param e1:
:param e2:
:return:
:param amp: surface brightness amplitude
:param Rs: scale radius: half-light radius = Rs / 0.551
:param e1: eccentricity component
:param e2: eccentricity component
:return: total integrated flux
"""
return self.spherical.total_flux(amp=amp, Rs=Rs)

0 comments on commit 6ab2d21

Please sign in to comment.