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
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
Behavior of the signal for negative time indices. Currently only supports
'loop'. Default is'loop'.
- digest
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.
- signal
Instance of the
SignalGeneratorclass defining the emitted signal.
- loc
Coordinates
(x, y, z)of the source. Default isnp.array([[0.0], [0.0], [1.0]]).
- num_channels
Number of output channels, automatically set based on the
microphone geometry.
- mics
MicGeomobject defining the positions of the microphones.
- env
An
Environmentor derived object providing sound propagation details, such asspeed of sound in the medium. Default isEnvironment.
- start_t
Start time of the signal in seconds. Default is
0.0.
- start
Start time of data acquisition at the microphones in seconds. Default is
0.0.
- up
Internal upsampling factor for finer signal resolution. Default is
16.
- num_samples
Total number of samples in the emitted signal, derived from the
signalgenerator.
- sample_freq
Sampling frequency of the signal, derived from the
signalgenerator.