PointSourceDipole¶
- class acoular.sources.PointSourceDipole¶
Bases:
PointSource
Define a fixed point source with dipole characteristics.
The
PointSourceDipole
class simulates a fixed point source with dipole characteristics by superimposing two nearby inversely phased monopoles. This is particularly useful for acoustic simulations where dipole sources are required.The generated output is available via the
result()
generator.See also
acoular.sources.PointSource
For modeling stationary point sources.
Notes
The dipole’s output is calculated as the superposition of two monopoles: one shifted forward and the other backward along the
direction
vector, with inverse phases. This creates the characteristic dipole radiation pattern.- direction = Tuple((0.0, 0.0, 1.0), desc='dipole orientation and distance of the inversely phased monopoles')¶
Vector defining the orientation of the dipole lobes and the distance between the inversely phased monopoles. The magnitude of the vector determines the monopoles’ separation:
distance = [lowest wavelength in spectrum] * [magnitude] * 1e-5
Use vectors with magnitudes on the order of
1.0
or smaller for best results. Default is(0.0, 0.0, 1.0)
(z-axis orientation).Note: Use vectors with order of magnitude around
1.0
or less for good results.
- prepadding = Enum('loop', desc='Behaviour for negative time indices.')¶
Behavior of the signal for negative time indices. Currently only supports
'loop'
. Default is'loop'
.
- digest = Property( …¶
A unique identifier for the current state of the source, based on its properties. (read-only)
- result(num=128)¶
Generate output signal at microphones in blocks.
- Parameters:
- num
int
, optional Number of samples per block to yield. Default is
128
.
- num
- Yields:
numpy.ndarray
A 2D array of shape (
num
,num_channels
) containing the signal detected at the microphones. The last block may have fewer samples ifnum_samples
is not a multiple ofnum
.
- Raises:
IndexError
If no more samples are available from the source.
Notes
If samples are needed for times earlier than the source’s
start_t
, the signal is taken from the end of the signal array, effectively looping the signal for negative indices.