BeamformerDamasPlus#

class acoular.fbeamform.BeamformerDamasPlus

Bases: BeamformerDamas

DAMAS deconvolution [2] for solving the system of equations.

Instead of the original Gauss-Seidel iterations, this class employs the NNLS or linear programming solvers from scipy.optimize or one of several optimization algorithms from the scikit-learn module. Needs a-priori delay-and-sum beamforming (BeamformerBase).

method

Type of fit method to be used (‘LassoLars’, ‘OMPCV’, ‘LP’, or ‘NNLS’, defaults to ‘NNLS’). These methods are implemented in the scikit-learn module or within scipy.optimize respectively.

n_iter

Maximum number of iterations, tradeoff between speed and precision; defaults to 500

unit_mult

Unit multiplier for evaluating, e.g., nPa instead of Pa. Values are converted back before returning. Temporary conversion may be necessary to not reach machine epsilon within fitting method algorithms. Defaults to 1e9.

digest

A unique identifier for the beamformer, based on its properties. (read-only)

integrate(sector, frange=None, num=0)

Integrates result map over a given sector.

Parameters:
sector: array of floats or :class:`~acoular.grids.Sector`

either an array, tuple or list with arguments for the ‘indices’ method of a Grid-derived class (e.g. RectGrid.indices or RectGrid3D.indices). Possible sectors would be array([xmin, ymin, xmax, ymax]) or array([x, y, radius]) or an instance of a Sector-derived class

frange: tuple or None

a tuple of (fmin,fmax) frequencies to include in the result if num*==0, or band center frequency/frequencies for which to return the results if *num>0; if None, then the frequency range is determined from the settings of the PowerSpectra.ind_low and PowerSpectra.ind_high of freq_data

numinteger

Controls the width of the frequency bands considered; defaults to 0 (single frequency line). Only considered if frange is not None.

num

frequency band width

0

single frequency line

1

octave band

3

third-octave band

n

1/n-octave band

Returns:
res or (f, res): array of floats or tuple(array of floats, array of floats)

If frange*==None or *num>0, the spectrum (all calculated frequency bands) for the integrated sector is returned as res. The dimension of this array is the number of frequencies given by freq_data and entries not computed are zero. If frange!=None and num*==0, then (f, res) is returned where *f are the (band) frequencies and the dimension of both arrays is determined from frange

sig_loss_norm()

If the diagonal of the CSM is removed one has to handle the loss of signal energy.

Done via a normalization factor.

synthetic(f, num=0)

Evaluates the beamforming result for an arbitrary frequency band.

Parameters:
f: float

Band center frequency.

numinteger

Controls the width of the frequency bands considered; defaults to 0 (single frequency line).

num

frequency band width

0

single frequency line

1

octave band

3

third-octave band

n

1/n-octave band

Returns:
array of floats

The synthesized frequency band values of the beamforming result at each grid point . Note that the frequency resolution and therefore the bandwidth represented by a single frequency line depends on the sampling frequency and used FFT block size.

psf_precision

The floating-number-precision of the PSFs. Default is 64 bit.

damp

Damping factor in modified gauss-seidel

calcmode

Flag that defines how to calculate and store the point spread function defaults to ‘single’.

  • ‘full’: Calculate the full PSF (for all grid points) in one go (should be used if the PSF

    at all grid points is needed, as with DAMAS)

  • ‘single’: Calculate the PSF for the grid points defined by grid_indices, one by one

    (useful if not all PSFs are needed, as with CLEAN)

  • ‘block’: Calculate the PSF for the grid points defined by grid_indices, in one go

    (useful if not all PSFs are needed, as with CLEAN)

  • ‘readonly’: Do not attempt to calculate the PSF since it should already be cached (useful

    if multiple processes have to access the cache file)

steer

Instance of SteeringVector or its derived classes that contains information about the steering vector. This is a private trait. Do not set this directly, use steer trait instead.

freq_data

PowerSpectra object that provides the cross spectral matrix and eigenvalues

r_diag

Boolean flag, if ‘True’ (default), the main diagonal is removed before beamforming.

r_diag_norm

If diagonal of the CSM is removed, some signal energy is lost. This is handled via this normalization factor. Internally, the default is: num_mics / (num_mics - 1).

If r_diag==True: if r_diag_norm==0.0, the default normalization = num_mics/(num_mics-1) is used. If r_diag_norm !=0.0, the user input is used instead. If r_diag==False, the normalization is 1.0 either way.

precision

Floating point precision of property result. Corresponding to numpy dtypes. Default = 64 Bit.

cached

Boolean flag, if ‘True’ (default), the result is cached in h5 files.

result

The beamforming result as squared sound pressure values at all grid point locations (readonly). Returns a (number of frequencies, number of gridpoints) array-like of floats. Values can only be accessed via the index operator [].