openlifu.plan.solution_analysis.get_offset_grid¶
- openlifu.plan.solution_analysis.get_offset_grid(da: DataArray, focus, origin=array([0., 0., 0.]), as_dataset=True)[source]¶
Transform the coords of a DataArray that is in transducer coordinates to focus coordinates
See get_focus_matrix for the meaning of “focus coordinates”
- Parameters:
da – DataArray whose coordinates will be used (presumably the transducer coordinates)
focus – A 3D point describing the focus location in the coordinates of da
origin – A 3D point describing the “effective origin” in the coordinates of da (see Transducer.get_effective_origin for the meaning of this).
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.