ewoksfluo.math.distance.compute_axis_transform#

ewoksfluo.math.distance.compute_axis_transform(coordinates, method='range')[source]#

Compute per-axis scaling factors and offsets.

Any zero scale values are replaced with 1.0 to avoid division by zero.

Parameters:
  • coordinates (ndarray) – Array of shape (Npoints, Ndim)

  • method (Optional[Literal['range', 'std']]) –

    • “range”: scale = max - min, offset = min

    • ”std”: scale = std, offset = mean

    • None: scale = 1, offset = 0

Return type:

Tuple[Optional[ndarray], Optional[ndarray]]

Returns:

(scale, offset), each shape (Ndim,)