Acoular 24.10 documentation

SampleSplitter

«  Cache   ::   process   ::   TimeAverage  »

SampleSplitter

class acoular.process.SampleSplitter

Bases: InOut

Distributes data blocks from source to several following objects. A separate block buffer is created for each registered object in (block_buffer) .

block_buffer = Dict(key_trait=Instance(Generator))

dictionary with block buffers (dict values) of registered objects (dict keys).

buffer_size = Int(100)

max elements/blocks in block buffers.

buffer_overflow_treatment = Dict(

defines behaviour in case of block_buffer overflow. Can be set individually for each registered object.

  • ‘error’: an IOError is thrown by the class

  • ‘warning’: a warning is displayed. Possibly leads to lost blocks of data

  • ‘none’: nothing happens. Possibly leads to lost blocks of data

register_object(*objects_to_register)

Function that can be used to register objects that receive blocks from this class.

remove_object(*objects_to_remove)

Function that can be used to remove registered objects.

result(num)

Python generator that yields the output block-wise from block-buffer.

Parameters:
numinteger

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).

Delivers a block of samples to the calling object. The last block may be shorter than num.

«  Cache   ::   process   ::   TimeAverage  »