MaskedTimeOut¶
- class acoular.tprocess.MaskedTimeOut¶
Bases:
TimeOut
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 fromsource
and generates output via the generatorresult()
.- source = Instance(SamplesGenerator)¶
Data source;
SamplesGenerator
or derived object.
- start = CLong(0, desc='start of valid samples')¶
Index of the first sample to be considered valid.
- stop = Trait(None, None, CLong, desc='stop of valid samples')¶
Index of the last sample to be considered valid.
- invalid_channels = ListInt(desc='list of invalid channels')¶
Channels that are to be treated as invalid.
- channels = Property(depends_on=['invalid_channels', 'source.numchannels'], desc='channel mask')¶
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', 'source.numchannels'], desc='number of valid input channels')¶
Number of valid channels, is set automatically.
- numsamples = Property(depends_on=['start', 'stop', 'source.numsamples'], desc='number of valid samples per channel')¶
Number of valid time samples, is set automatically.
- basename = Property(depends_on='source.digest', desc='basename for cache file')¶
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.
- Samples in blocks of shape (num,