grids.mixins.core.GridUtilsMixin.compute_coords_from_index#

GridUtilsMixin.compute_coords_from_index(index: IndexInput, /, axes: AxesInput | None = None, origin: Literal['active', 'global'] = 'active', __validate__: bool = True) Tuple[float, ...][source]#

Compute the physical coordinates at a specific grid index.

Parameters:
  • index (int or sequence of int) – The grid index to evaluate. If axes is provided, must match its length.

  • axes (str or list of str, optional) – The axes to extract coordinates along. If None, all axes are used.

  • origin ({"active", "global"}, default "active") – Whether the index is specified relative to the active domain or the global grid.

  • __validate__ (bool, default True) – If True, checks index bounds and normalizes it to global coordinates.

Returns:

The physical coordinate values at the given index, one per selected axis.

Return type:

tuple of float