Skip to content

Commit 629904b

Browse files
author
NiekWielders
committed
added tests for cNFWScatterLudlow
1 parent eba9e39 commit 629904b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

test_autogalaxy/profiles/mass/dark/test_nfw_scatter.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,27 @@ def test__scatter_is_nonzero():
5959
deflections_ell = nfw_ell.deflections_yx_2d_from(grid=grid)
6060

6161
assert deflections_sph[0] != pytest.approx(deflections_ell[0], 1.0e-4)
62+
63+
# Testing the cored NFW
64+
65+
cnfw_sph = ag.mp.cNFWMCRScatterLudlowSph(
66+
ell_comps=(0.5, 0.5),
67+
mass_at_200=1.0e9,
68+
scatter_sigma=1.0,
69+
f_c=0.01,
70+
redshift_object=0.6,
71+
redshift_source=2.5,
72+
)
73+
74+
assert cnfw_sph.scale_radius == pytest.approx(0.14978, 1.0e-4)
75+
76+
cnfw_sph = ag.mp.cNFWMCRScatterLudlowSph(
77+
ell_comps=(0.5, 0.5),
78+
mass_at_200=1.0e9,
79+
scatter_sigma=-1.0,
80+
f_c=0.01,
81+
redshift_object=0.6,
82+
redshift_source=2.5,
83+
)
84+
85+
assert cnfw_sph.scale_radius == pytest.approx(0.29886, 1.0e-4)

0 commit comments

Comments
 (0)