def _get_ext_digest( self ):
return digest( self, "ext_digest" )
def calc(self, ac, fr):
Calculates the DAMAS result for the frequencies defined by :attr:`freq_data`
This is an internal helper function that is automatically called when
accessing the beamformer"s :attr:`~BeamformerBase.result` or calling
its :meth:`~BeamformerBase.synthetic` method.
A Gauss-Seidel algorithm implemented in C is used for computing the result.
Parameters
----------
ac : array of floats
This array of dimension ([number of frequencies]x[number of gridpoints])
is used as call-by-reference parameter and contains the calculated
value after calling this method.
fr : array of booleans
The entries of this [number of frequencies]-sized array are either
"True" (if the result for this frequency has already been calculated)
or "False" (for the frequencies where the result has yet to be calculated).
After the calculation at a certain frequency the value will be set
to "True"
Returns
-------
This method only returns values through the *ac* and *fr* parameters
i = self.freq_data.indicesself.steer_obj.f = (self.freq_data.fftfreq()[i]).tolist()
p = PointSpreadFunction(steer_obj=self.steer_obj, calcmode=self.calcmode, precision=self.psf_precision)
for cntFreq in range(len(i)):
if not fr[i[cntFreq]]:
y = array(self.beamformer.result[i[cntFreq]])
x = y.copy()
p.freq = self.steer_obj.f[cntFreq]
psf = p.psf[:]
damasSolverGaussSeidel(psf, y, self.n_iter, self.damp, x)
ac[i[cntFreq]] = x
fr[i[cntFreq]] = True
class BeamformerDamasPlus (BeamformerDamas):