Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed May 25, 2024
2 parents 6ab2d21 + b7cfdc1 commit fc3bd0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lenstronomy/LightModel/Profiles/hernquist.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def total_flux(amp, Rs):
:return: total integrated flux of profile
"""
rhos = amp / Rs
m_tot = 2 * np.pi * rhos * Rs ** 3
m_tot = 2 * np.pi * rhos * Rs**3
return m_tot


Expand Down
4 changes: 1 addition & 3 deletions test/test_LightModel/test_Profiles/test_hernquist.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def test_total_flux(self):
total_flux = self.hernquist.total_flux(amp=amp, Rs=rs)
flux = self.hernquist.function(x, y, amp=amp, Rs=rs)
total_flux_numerics = np.sum(flux) * delta_pix**2
npt.assert_almost_equal(total_flux_numerics/total_flux, 1, decimal=1)
npt.assert_almost_equal(total_flux_numerics / total_flux, 1, decimal=1)

total_flux_ellipse = self.hernquist_ellipse.total_flux(amp=amp, Rs=rs)
npt.assert_almost_equal(total_flux_ellipse, total_flux)


0 comments on commit fc3bd0d

Please sign in to comment.