grids.core.UniformGrid.axes_units#
- property UniformGrid.axes_units: List[Unit]#
Units corresponding to each coordinate axis in the grid.
This property returns the physical units associated with each axis of the grid, as determined by the coordinate system’s dimensional interpretation and the internal unit system.
The returned list is ordered according to the axes defined by the coordinate system.
- Returns:
A list of units (e.g., unyt.cm, unyt.rad) corresponding to each axis in the grid’s coordinate system.
- Return type:
list
ofunyt.Unit
Examples
For a cylindrical coordinate system with axes [“r”, “theta”, “z”], and a unit system that maps “length” to “cm” and “angle” to “rad”, this property might return:
>>> grid.axes_units [unyt.cm, unyt.rad, unyt.cm]
Notes
The mapping from axes to physical dimensions is defined by coordinate_system.__AXES_DIMENSIONS__, which lists the physical dimension (e.g., “length”, “angle”) associated with each axis.