Acoular 24.05 documentation

WriteH5

«  WriteWAV   ::   tprocess   ::   SampleSplitter  »

WriteH5

class acoular.tprocess.WriteH5

Bases: TimeInOut

Saves time signal as *.h5 file.

name = File(filter=['*.h5'], desc='name of data file')

Name of the file to be saved. If none is given, the name will be automatically generated from a time stamp.

numsamples_write = Int(-1)

Number of samples to write to file by result method. defaults to -1 (write as long as source yields data).

precision = Trait('float32', 'float64', desc='precision of H5 File')

The floating-number-precision of entries of H5 File corresponding to numpy dtypes. Default is 32 bit.

metadata = Dict(desc='metadata to be stored in .h5 file')

Metadata to be stored in HDF5 file object

save()

Saves source output to *.h5 file.

add_metadata(f5h)

Adds metadata to .h5 file.

result(num)

Python generator that saves source output to *.h5 file and yields the source 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. Echos the source output, but reads it from cache when available and prevents unnecassary recalculation.

«  WriteWAV   ::   tprocess   ::   SampleSplitter  »