HDF5 Logger Interface¶
-
class
larpix.logger.h5_logger.
HDF5Logger
(filename=None, buffer_length=10000)[source]¶ The HDF5Logger is logger class for logging packets to an hdf5 file format.
Parameters: - filename – filename to store data (optional, default:
None
) - buffer_length – how many data messages to hang on to before flushing
buffer to the file (optional, default:
10000
)
-
classmethod
encode
(data, *args, **kwargs)[source]¶ Converts data object into a numpy mixed type array as described by
data_desc
-
classmethod
encode_packet
(packet, timestamp=None, *args, **kwargs)[source]¶ Converts packets into numpy mixed typ array according to
data_desc['raw_packet']
-
record
(data, timestamp=None, *args, **kwargs)[source]¶ Send the specified data to log file .. note:: buffer is flushed after all
data
is placed in buffer, thismeans that the buffer size will exceed the set value temporarilyParameters: - data – list of data to be written to log
- timestamp – unix timestamp to be associated with data
-
open
(enable=True)[source]¶ Open output file if it is not already. If files already exist then data will be appended to the end of arrays.
Parameters: enable – True
if you want to enable the logger after opening (Optional, default=``True``)
- filename – filename to store data (optional, default: