openlifu.plan.solution_analysis.get_gridded_transformed_coords

openlifu.plan.solution_analysis.get_gridded_transformed_coords(da: DataArray, matrix: ndarray, as_dataset=True)[source]

Transform the coords of a DataArray using a transform matrix.

Parameters:
  • da – DataArray whose coordinates will be used

  • matrix – a 4x4 coordinate transformation matrix, transforming from the desired coordinate system to the coordinate system of da

  • as_dataset – Whether to return the transformed coords as a numpy array or an xarray Dataset

Returns the transformed coordinate grid as either a numpy array or an xarray Dataset.