zea.Probe¶

class zea.Probe(name=None, type=None, probe_center_frequency=None, probe_bandwidth_percent=None, probe_geometry=None, element_width=None, element_height=None, lens_sound_speed=None, lens_thickness=None)[source]¶

Bases: ProbeSpec

Probe class which is a container for ultrasound transducer parameters.

These parameters differentiate from the scan parameters, which might very per TrackSpec. Per definition, probe parameters are constant for the duration of an acquisition, while scan parameters may vary per frame or per transmit event. This is the reason they are stored in separate groups in a File object. Upon loading parameters, it is recommended to use the ~zea.parameters.Parameters class. This allows you to use a single interface to access both probe and scan parameters.

classmethod from_name(probe_name, **kwargs)[source]¶

Create a probe from its name.

Parameters:

probe_name (str) – Name of the probe.

Returns:

Probe object.

Return type:

Probe

get_parameters()[source]¶

Return a dict of the probe parameters.

static get_pitch(probe_geometry)[source]¶

Compute the pitch (centre-to-centre element spacing) in metres from the probe geometry.

Raises ValueError when the probe has fewer than 2 elements, the neighbouring elements are not uniformly spaced (which includes matrix arrays), or the elements coincide.

Return type:

float

property kerf: float | None¶

Gap between elements in metres, derived from element_width and pitch.

property pitch: float | None¶

Centre-to-centre element spacing in metres, derived from probe_geometry.

Raises ValueError when:

  • probe_geometry is not set,

  • the probe has fewer than 2 elements,

  • the spacing is non-uniform (which includes matrix arrays), to surface likely data errors rather than silently returning None, or

  • the elements coincide.

to_tensor(keep_as_is=None)[source]¶

Convert the attributes in the object to tensors.