HDFMapTemplateο
- class bapsflib._hdf.maps.templates.HDFMapTemplate(group: Group)ο
Bases:
ABCTemplate class for all mapping template classes.
Note
To fully define a subclass the
_build_configsabstract method needs to be defined.- abstractmethod _build_configs()
Inspect the HDF5 group and build the configuration dictionary,
configs.Functionality should specifically populate
self._configsinstead ofself.configs. If a mapping fails, then aHDFMappingErrorshould be raised.
If a subclass needs to initialize additional variables before
_build_configsis called in the__init__, then those routines can be defined in the_init_before_build_configsmethod.- _init_before_build_configs()
Any initialization that needs to be performed before executing
self._build_configsin__init__.By default we do nothing, but subclasses can override this for their specific purposes.
- Parameters:
group (
h5py.Group) β The HDF5 to apply the mapping to.
Attributes Summary
Dictionary containing all the relevant mapping information to translate the corresponding device data in the HDF5 file and provide a consistent user interface via
File.List of names of the HDF5 datasets within the mapped group, at the root level.
Instance of the HDF5 group that was mapped.
Name of the mapped HDF5 group.
Path of the mapped HDF5 group in the HDF5 file.
Metadata information about the mapping type and the mapped group location in the HDF5 file.
Mapping class type (
MapTypes).List of names of the HDF5 subgroups within the mapped group, at the root level.
Attributes Documentation
- configsο
Dictionary containing all the relevant mapping information to translate the corresponding device data in the HDF5 file and provide a consistent user interface via
File.
- dataset_namesο
List of names of the HDF5 datasets within the mapped group, at the root level.
- groupο
Instance of the HDF5 group that was mapped.
- group_nameο
Name of the mapped HDF5 group.
- group_pathο
Path of the mapped HDF5 group in the HDF5 file.
- infoο
Metadata information about the mapping type and the mapped group location in the HDF5 file.
Extended Summaryο
The dictionary will contain the following elements:
info = { "group name": "Device", # name of the mapped HDF5 group "group path": "/foo/bar/Device", # internal HDF5 path to the group "maptype": self.maptype, # mapping class type }
- subgroup_namesο
List of names of the HDF5 subgroups within the mapped group, at the root level.