TimeSamples¶
-
class
acoular.sources.
TimeSamples
¶ Bases:
acoular.tprocess.SamplesGenerator
Container for time data in *.h5 format.
This class loads measured data from h5 files and and provides information about this data. It also serves as an interface where the data can be accessed (e.g. for use in a block chain) via the
result()
generator.-
name
= File(filter=['*.h5'], …¶ Full name of the .h5 file with data.
-
basename
= Property( depends_on = 'name', #filter=['*.h5'], …¶ Basename of the .h5 file with data, is set automatically.
-
numchannels
= CLong(0, …¶ Number of channels, is set automatically / read from file.
-
numsamples
= CLong(0, …¶ Number of time data samples, is set automatically / read from file.
-
data
= Any( transient = True, …¶ The time data as array of floats with dimension (numsamples, numchannels).
-
h5f
= Instance(H5FileBase, transient = True)¶ HDF5 file object
-
metadata
= Dict( …¶ Provides metadata stored in HDF5 file object
-
load_data
()¶ Open the .h5 file and set attributes.
-
load_timedata
()¶ loads timedata from .h5 file. Only for internal use.
-
load_metadata
()¶ loads metadata 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.
-