PointSourceDipole#
- class acoular.sources.PointSourceDipole
Bases:
PointSourceDefine a fixed point source with dipole characteristics.
The
PointSourceDipoleclass 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
PointSourceFor 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
directionvector, with inverse phases. This creates the characteristic dipole radiation pattern.- direction = Tuple((0.0, 0.0, 1.0))
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.0or smaller for best results. Default is(0.0, 0.0, 1.0)(z-axis orientation).Note: Use vectors with order of magnitude around
1.0or less for good results.
- prepadding = Enum('loop')
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.ndarrayA 2D array of shape (
num,num_channels) containing the signal detected at the microphones. The last block may have fewer samples ifnum_samplesis not a multiple ofnum.
- Raises:
IndexErrorIf 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.