PotentialSymmetry#

class gala.potential.potential.PotentialSymmetry[source]#

Bases: ABC

Base class for potential coordinate symmetries.

This abstract base class defines the interface for converting between symmetry-specific coordinates and the Cartesian coordinates used internally by potential calculations.

Attributes Summary

coord_names

Tuple of coordinate names for this symmetry.

Methods Summary

to_cartesian(**coords)

Convert symmetry coordinates to Cartesian coordinates.

validate_coords(**coords)

Validate that the provided coordinates are appropriate for this symmetry.

Attributes Documentation

coord_names#

Tuple of coordinate names for this symmetry.

Returns:
coord_namestuple of str

Names of the coordinates in this symmetry system.

Methods Documentation

abstractmethod to_cartesian(**coords)[source]#

Convert symmetry coordinates to Cartesian coordinates.

Parameters:
**coords

Coordinate values in the symmetry system. Keys must match the names in coord_names.

Returns:
xyzQuantity

Cartesian coordinates with shape (3, n_points). If inputs are unitless, output will also be unitless.

validate_coords(**coords)[source]#

Validate that the provided coordinates are appropriate for this symmetry.

Parameters:
**coords

Coordinate keyword arguments to validate.

Raises:
ValueError

If the coordinates are invalid or incomplete.