openlifu.plan.solution_analysis.get_beamwidth

openlifu.plan.solution_analysis.get_beamwidth(da: DataArray, focus, dim, cutoff: float | None = None, origin=array([0., 0., 0.]), min_offset: float | None = None, max_offset: float | None = None) float[source]

Determine the FWHM (or differently thresholded width) of a DataArray along a focal coordinate system axis.

See get_focus_matrix for the meaning of “focal coordinate system.”

Parameters:
  • da – DataArray whose values will be considered (presumably defined on transducer coordinates).

  • focus – A 3D point describing the focus location in the coordinates of da

  • dim – The name of the dimension of da whose corresponding focal coordinate system axis should be sampled along. For example, the “axial” dimension of a transducer corresponds to the focal axis (z-axis) in the focal coordinate system, that is, the ray from the transducer’s “effective origin” (see Transducer.get_effective_origin) to the focus center.

  • cutoff – The threshold against which da values are compared. If not provided then the half-max is used, making this an “FWHM” function.

  • origin – A 3D point describing the “effective origin” in the coordinates of da (see Transducer.get_effective_origin for the meaning of this).

  • min_offset – How far along the negative focal dim direction to sample. By default samples as far as the coordinate grid allows.

  • max_offset – How far along the positive focal dim direction to sample. By default samples as far as the coordinate grid allows.

Returns: The “beam width” along the focal dim direction, by measuring from the from closest-to-focus point along the

negative focal dim axis for which da goes below cutoff up to the closest-to-focus point along the positive focal dim axis for which da goes below cutoff.