mach.wavefront.spherical

Contents

mach.wavefront.spherical#

mach.wavefront.spherical(
origin_m: Real[Array, 'xyz=3'],
points_m: Real[Array, '*points xyz=3'],
focus_m: Real[Array, 'xyz=3'],
aperture_bounds_m: Real[Array, 'corners=4 xyz=3'] | None = None,
) → Real[Array, '*points']#

Spherical-wave transmit distance (also known as focused or diverging waves).

Spherical waves propagate like a collapsing sphere focusing onto a point, or an expanding sphere diverging from a point.

Parameters:
  • origin_m – xyz-position of the transmitting element/sender in meters. distance=0 at the origin.

  • points_m – xyz-positions of the points to compute the transmit-arrival time for, in meters.

  • focus_m – xyz-position of the focal point where spherical waves converge, in meters. sometimes called the source or apex. for a focused wave, the focus is in front of the origin. for a diverging wave, the focus is behind the origin. Note: ‘focus’ refers to the convergence point, while ‘origin’ refers to the physical transducer element that transmits the wave.

  • aperture_bounds_m – Optional corners of the active transmit aperture as shape (4, 3) in meters. Corners must form a nondegenerate rectangle, be coplanar, and be ordered around its perimeter using the right-hand rule so their normal points into the imaging region (for example: lateral-min elevation-min, lateral-max elevation-min, lateral-max elevation-max, lateral-min elevation-max). When aperture_bounds_m is provided, spherical uses the ideal spherical equation inside the rectangular focus pyramids and linearly interpolates boundary spherical distances between them, following the unified pixel-based beamforming idea of Nguyen and Prager (https://doi.org/10.1109/TMI.2015.2456982). This removes the focal-plane discontinuity of the ideal spherical equation for off-axis pixels. Outside the insonified sector the result is a travel-time continuity approximation, not a full wave model.

Returns:

The transmit-wavefront-arrival distance for each point in meters. To convert to time, divide by sound speed: distance_m / sound_speed_m_s

Raises:

ValueError – If aperture bounds do not describe an ordered rectangle or if the focus lies in the aperture plane.

Notes

Without aperture_bounds_m, this matches Equation 5 / Figure 2 from Perrot et al., Ultrasonics 2021, https://www.biomecardio.com/publis/ultrasonics21.pdf with L=0, extended to 3D.

The sign convention accounts for the direction of wave propagation. For typical ultrasound imaging where z increases with depth, negative values indicate the wavefront arrives before the reference time, positive values after.