Skip to content

Commit

Permalink
Added new failing unit test to address astropy#993
Browse files Browse the repository at this point in the history
  • Loading branch information
aphearin committed Feb 19, 2021
1 parent c225940 commit 0d42df8
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,20 @@ def test_mass_definition_flexibility():
halocat.halo_table["halo_mvir"]
)
model.populate_mock(halocat, seed=43)


def test_mass_definition_flexibility2():
"""Regression test for Issue #993."""
halocat = FakeSim()
halocat.halo_table["halo_mass_custom"] = np.copy(halocat.halo_table["halo_mvir"])
halocat.halo_table["halo_radius_custom"] = np.copy(halocat.halo_table["halo_rvir"])
halocat.halo_table.remove_column("halo_upid")
halocat.halo_table.remove_column("halo_mvir")
halocat.halo_table.remove_column("halo_rvir")
model = PrebuiltHodModelFactory(
"zheng07",
mdef="custom",
prim_haloprop_key="halo_mass_custom",
halo_boundary_key="halo_radius_custom",
)
model.populate_mock(halocat)

0 comments on commit 0d42df8

Please sign in to comment.