The Beamformer class

When instantiating a beamformer class with the settings from the Reader, we expect to store values for all the beamformer.setups and the beamformer.options.

Beamformer setups

The setups are here to store the main information. The list of the setups is defined within beamformers/setups.py, but these are:

Setup name

Type

Default

Description

emitted_probe received_probe

array_like

These are the probes used to acquire the data, they both have the shape (3, nb_transmissions, nb_elements). The first dimension is the x, y and z positions of the elements, and, for each transmissions, the concerned elements. This configuration allows to have distinct emission and reception probe (which is useful for STA for example). Stored in m.

delays

array_like

The acquisition delays for each cycle for each element. If we are sending tilted plane waves, the delays are stored here (in s).

transmissions_idx

array_like

The indices for the transmissions, as integers, if you don’t want to perform the beamforming on all transmissions (single plane wave vs full compounded for example).

sound_speed

float

The speed of sound used to compute the delays, or simply an estimation of the medium sound of speed if there’s no delays (in m/s).

f_number

float

The f-number to use for the beamforming.

t0

float

The initial time to add to the transmission times (in s).

sampling_freq

float

The sampling frequency of the acquisition system (in Hz).

central_freq

float

The central frequency of the probe (in Hz).

signal_duration

float

The duration of the emitted signal, it is used to adjust the original t0 to the center of the emission pulse.

bandwidth

float

The bandwidth of the probe, in %.

prf

float

The Pulse Repetition Frequency (in Hz).

emitted_thetas received_thetas

array_like

[0.]

For convex probes, this indicates the thetas of the probe for each emitted / received probe elements.

Each of these setups can be updated at any time using:

1beamformer.update_setup('name_of_setup', value)

Beamformer options

The options are here to define the beamforming options, not all of them are implemented in all the beamformers though:

Option name

Type

Default

Description

interpolation

int str

‘linear’

The interpolation method to use (can be either ‘none’, ‘linear’, ‘quadratic’ or ‘cubic’). The latter two are only implemented in Numpy (CPU).

reduction

int str

‘sum’

The reduction method, either ‘sum’ or ‘mean’. This is defining the way we are reducing the delays at the end of the beamforming process.

rx_apodization

int str

‘boxcar’

The reception apodization method, either ‘boxcar’ or ‘tukey’, only ‘boxcar’ is supported by Numpy.

rx_apodization_alpha

float

0.1

The coefficient for the apodization method.

compound

int bool

True

If set to True, we compound the data along the transmission axis. Can be combined with reduce.

reduce

int bool

True

If set to True, we reduce the data along the received probe elements. Can be combined with compound. Only supported for DAS beamformer.

fix_t0

int bool

True

If set to True, the t0 is automatically set to t0 - signal_duration / 2.

emitted_aperture

int bool

True

If set to True, we consider the emitted elements also have an aperture. Else case, only the received elements are affected by the f-number (like MUST).

Same as for the setups, you can update the options anytime using:

1beamformer.update_option('name_of_option', value)

Compatibility

As specified above, all the options are not supported by all the beamformers, or the libraries (Numpy / Numba for CPU, and cupy for GPU). This section is listing the current support. If nothing is specified, they are all supported.

Compatibility of the interpolation option:

Library

None

Linear

Cubic

Quadratic

CPU

Numpy

OK

OK

OK

OK

Numba

OK

OK

GPU

cupy

OK

OK

Compatibility of the rx_apodization option:

Library

boxcar

tukey

CPU

Numpy

OK

Numba

OK

OK

GPU

cupy

OK

OK

Compatibility of the compound option:

Beamformer

Reduction

Comments

DAS

Sum

OK

Mean

The ‘no compound’ option is supported for Delay And Mean, but note that all the transmissions will be preserved. This means that if, for a given pixel, one of the transmission is not solicited (due to the aperture of the element, or the transmission angle or whatever), its dedicated transmission will be set to 0, but there won’t be any information about if it has been solicited or not. Therefore, if you want to perform the mean of these transmissions by yourself, the result might be different from the one with the ‘compound’ option.

FDMAS

Both

The FDMAS algorithm performs the non-linear root / square operations on the reduced raw-focused data (summed or averaged). This means that the sum of the beamformed transmissions is not equal to the compounded beamforming.

p-DAS

Both

Same as the FDMAS algorithm, the non-linear operations of p-DAS are also performed on reduced data.

Compatibility of the reduce option:

Beamformer

Reduction

Comments

DAS

Sum

OK

Mean

The ‘no reduction’ option is supported for Delay And Mean, but note that all the probe elements will be preserved. This means that if, for a given pixel, one of the probe element is not solicited (due to the aperture of the element defined with the f#), its dedicated element will be set to 0, but there won’t be any information about if the element has been solicited or not. Therefore, if you want to perform the mean of these elements by yourself, the result might be different from the one with the ‘reduce’ option.

FDMAS

Both

No support, as the FDMAS reduction is a core part of the algorithm, this would lead to the same result as the DAS

p-DAS

Both

No support, for the same reason as FDMAS