Acoular 21.05 documentation

MaskedTimeInOut

«  TimeInOut   ::   tprocess   ::   Trigger  »

MaskedTimeInOut

class acoular.tprocess.MaskedTimeInOut

Bases: acoular.tprocess.TimeInOut

Signal processing block for channel and sample selection.

This class serves as intermediary to define (in)valid channels and samples for any SamplesGenerator (or derived) object. It gets samples from source and generates output via the generator result().

start = CLong(0, …

Index of the first sample to be considered valid.

stop = Trait(None, None, CLong, …

Index of the last sample to be considered valid.

invalid_channels = ListInt( …

Channels that are to be treated as invalid.

channels = Property(depends_on = ['invalid_channels', 'source.numchannels'], …

Channel mask to serve as an index for all valid channels, is set automatically.

numchannels_total = Delegate('source', 'numchannels')

Number of channels in input, as given by source.

numsamples_total = Delegate('source', 'numsamples')

Number of samples in input, as given by source.

numchannels = Property(depends_on = ['invalid_channels',\ …

Number of valid channels, is set automatically.

numsamples = Property(depends_on = ['start', 'stop', 'source.numsamples'], …

Number of valid time samples, is set automatically.

basename = Property( depends_on = 'source.digest', …

Name of the cache file without extension, readonly.

result(num)

Python generator that yields the output block-wise.

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

The last block may be shorter than num.

«  TimeInOut   ::   tprocess   ::   Trigger  »