Skip to content

Commit

Permalink
Merge pull request lenstronomy#639 from sibirrer/main
Browse files Browse the repository at this point in the history
simplified inheritance in NFW_ELLIPSE_CSE profile
  • Loading branch information
ahuang314 authored Aug 8, 2024
2 parents eadffc8 + 272e9a3 commit 78e4bb2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lenstronomy/LensModel/Profiles/nfw_ellipse_cse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
from lenstronomy.Util import util
from lenstronomy.LensModel.Profiles.nfw import NFW
from lenstronomy.LensModel.Profiles.nfw_ellipse_potential import NFWEllipsePotential
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
from lenstronomy.LensModel.Profiles.cored_steep_ellipsoid import CSEProductAvgSet
import lenstronomy.Util.param_util as param_util

__all__ = ["NFW_ELLIPSE_CSE"]


class NFW_ELLIPSE_CSE(NFWEllipsePotential):
class NFW_ELLIPSE_CSE(LensProfileBase):
"""
this class contains functions concerning the NFW profile with an ellipticity defined in the convergence
parameterization of alpha_Rs and Rs is the same as for the spherical NFW profile
Expand Down Expand Up @@ -279,6 +280,18 @@ def hessian(self, x, y, Rs, alpha_Rs, e1, e2, center_x=0, center_y=0):

return const * f_xx, const * f_xy, const * f_xy, const * f_yy

def mass_3d_lens(self, r, Rs, alpha_Rs, e1=1, e2=0):
"""
:param r: radius (in angular units)
:param Rs:
:param alpha_Rs:
:param e1:
:param e2:
:return:
"""
return self.nfw.mass_3d_lens(r, Rs, alpha_Rs)

def _normalization(self, alpha_Rs, Rs, q):
"""Applying to eqn 7 and 8 in Oguri 2021 from phenomenological definition.
Expand Down

0 comments on commit 78e4bb2

Please sign in to comment.