Acoular 21.05 documentation

MaskedTimeSamples

«  TimeSamples   ::   sources   ::   PointSource  »

MaskedTimeSamples

class acoular.sources.MaskedTimeSamples

Bases: acoular.sources.TimeSamples

Container for time data in *.h5 format.

This class loads measured data from h5 files and provides information about this data. It supports storing information about (in)valid samples and (in)valid channels It also serves as an interface where the data can be accessed (e.g. for use in a block chain) via the result() generator.

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', 'numchannels_total'], …

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

numchannels_total = CLong(0, …

Number of channels (including invalid channels), is set automatically.

numsamples_total = CLong(0, …

Number of time data samples (including invalid samples), is set automatically.

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

Number of valid channels, is set automatically.

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

Number of valid time data samples, is set automatically.

load_data()

Open the .h5 file and set attributes.

load_timedata()

loads timedata from .h5 file. Only for internal use.

result(num=128)

Python generator that yields the output 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.

«  TimeSamples   ::   sources   ::   PointSource  »