Skip to content

Commit

Permalink
Merge pull request #322 from neutrinoceros/rfc/set_operations
Browse files Browse the repository at this point in the history
RFC: clarify some set operations in `GasField.map`
  • Loading branch information
neutrinoceros authored Apr 7, 2024
2 parents b69d2bf + 8fc5d95 commit d6b3095
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nonos/api/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ def native_from_wanted(self, _wanted_x1: str, _wanted_x2: Optional[str] = None,
for i in wanted:
if i not in conversion:
raise KeyError(f"{i} not in {tuple(conversion.keys())}")
if set(wanted) & {"x", "y", "z"} == set(wanted):
if {"x", "y", "z"}.issuperset(wanted):
target_geometry = "cartesian"
elif set(wanted) & {"R", "phi", "z"} == set(wanted):
elif {"R", "phi", "z"}.issuperset(wanted):
target_geometry = "polar"
elif set(wanted) & {"r", "theta", "phi"} == set(wanted):
elif {"r", "theta", "phi"}.issuperset(wanted):
target_geometry = "spherical"
else:
raise ValueError(f"Unknown wanted plane: {wanted}.")
Expand Down

0 comments on commit d6b3095

Please sign in to comment.