Skip to content

Commit

Permalink
Access list of swiftsimio attributes correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleaoman committed Dec 1, 2024
1 parent b4d4e04 commit 3e7731a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion swiftgalaxy/halo_catalogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def __dir__(self) -> list[str]:
out : list
The list of catalogue attribute names.
"""
return list(self._catalogue.group_metadata.field_names)
return list(self._catalogue.metadata.present_group_names)


class Velociraptor(_HaloCatalogue):
Expand Down
6 changes: 5 additions & 1 deletion tests/test_halo_catalogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,11 @@ def test_dir_for_tab_completion(self, soap):
Just check a couple, don't need to be exhaustive.
"""
for prop in ("exclusive_sphere_100kpc", "input_halos", "metadata"):
for prop in (
"exclusive_sphere_100kpc",
"input_halos",
"spherical_overdensity_bn98",
):
assert prop in dir(soap)


Expand Down

0 comments on commit 3e7731a

Please sign in to comment.