HDF5Mixin¶
-
class
support.hdf5_util.
HDF5Mixin
¶ Bases:
object
Mixin class with methods for creating and writing to HDF5 files. This mixin assumes that the derived class implements the following .. attribute:: * name
-
\* base_data_dir
-
\* data_dir
-
\* data_file_obj
-
\* date_file_name
-
\* data_file_path
-
\* file_attr_keys
-
\* header
Moreover, the
create_scangroup
andwrite_to_data_file
methods are to be reimplemented.Methods Summary
Create year and day of year (doy) subdirectories under the
data_dir
attributecreate a HDF5 group for a scan
Put the highest level metadata in the datafile.
create, if necessary, subdirectories for today’s data directory, and then open up a
h5py.File
object.Write the data and metadata from the latest accumulation in the file
Methods Documentation
-
create_data_directory
()¶ Create year and day of year (doy) subdirectories under the
data_dir
attribute
-
create_scangroup
()¶ create a HDF5 group for a scan
Creates empty datasets for the data and metadata associated with each record of a scan.
-
initialize_data_file
()¶ Put the highest level metadata in the datafile.
The registers that never change in a ROACH are put in top-level attributes
-
open_data_file
()¶ create, if necessary, subdirectories for today’s data directory, and then open up a
h5py.File
object.- Returns
h5py.File
-
write_to_data_file
()¶ Write the data and metadata from the latest accumulation in the file
After writing a new empty record is created if more records are expected for this scan.
-