Skip to content

Commit

Permalink
Implemented fix to bug report astropy#993
Browse files Browse the repository at this point in the history
  • Loading branch information
aphearin committed Feb 19, 2021
1 parent bee45fc commit b96a096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ def populate_mock(
"halo_mass_column_key"
]
except KeyError:
pass
if hasattr(self, "_haloprop_list"):
self._haloprop_list.extend(model_defaults.default_halo_mvir_props)
else:
a = model_defaults.default_haloprop_list_inherited_by_mock
b = model_defaults.default_halo_mvir_props
self._haloprop_list = a + b
self.mock = self.mock_factory(**mock_factory_init_args)

additional_potential_kwargs = (
Expand Down
5 changes: 2 additions & 3 deletions halotools/empirical_models/model_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
"halo_vx",
"halo_vy",
"halo_vz",
"halo_mvir",
"halo_rvir",
"halo_upid",
]

default_halo_mvir_props = ["halo_mvir", "halo_rvir", "halo_upid"]

prim_haloprop_key = "halo_mvir"
sec_haloprop_key = "halo_nfw_conc"

Expand Down

0 comments on commit b96a096

Please sign in to comment.