Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 25, 2024
1 parent cd6f655 commit b7cfdc1
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:
"""
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 b7cfdc1

Please sign in to comment.