PointSource¶
- class acoular.sources.PointSource¶
Bases:
SamplesGenerator
Class to define a fixed point source with an arbitrary signal. This can be used in simulations.
The output is being generated via the
result()
generator.- signal = Trait(SignalGenerator)¶
Emitted signal, instance of the
SignalGenerator
class.
- loc = Tuple((0.0, 0.0, 1.0), …¶
Location of source in (x, y, z) coordinates (left-oriented system).
- numchannels = Delegate('mics', 'num_mics')¶
Number of channels in output, is set automatically / depends on used microphone geometry.
- env = 2)¶
Environment
or derived object, which provides information about the sound propagation in the medium.
- start_t = Float(0.0, …¶
Start time of the signal in seconds, defaults to 0 s.
- start = Float(0.0, …¶
Start time of the data aquisition at microphones in seconds, defaults to 0 s.
- prepadding = Trait('loop','zeros', desc="Behaviour for negative time indices.")¶
Signal behaviour for negative time indices, i.e. if
start
< :attr:start_t. loop take values from the end ofsignal.signal()
array. zeros set source signal to zero, advisable for deterministic signals. defaults to loop.
- up = Int(16, …¶
Upsampling factor, internal use, defaults to 16.
- sample_freq = Delegate('signal')¶
Sampling frequency of the signal, is set automatically / depends on
signal
.
- result(num=128)¶
Python generator that yields the output at microphones block-wise.
- Parameters:
- numinteger, defaults to 128
This parameter defines the size of the blocks to be yielded (i.e. the number of samples per block) .
- Returns:
- Samples in blocks of shape (num, numchannels).
The last block may be shorter than num.