FauxHDFBuilder¶
- class bapsflib._hdf.maps.FauxHDFBuilder(name=None, add_modules=None, **kwargs)¶
Bases:
File
Builds a Faux HDF5 file that simulates a HDF5 constructed at BaPSF.
- Parameters:
name (str) – name of HDF5 file
add_modules –
kwargs –
Attributes Summary
Dictionary containing the module objects associated with the added modules.
Path to HDF5 file
Temporary directory containing
tempfile
.Temporary HDF5 file.
Methods Summary
add_module
(mod_name[, mod_args])Adds all the groups and datasets to the HDF5 file for the requested module.
cleanup
()Close the HDF5 file and cleanup any temporary directories and files.
Remove all control device modules
Remove all digitizer modules
Remove all MSI modules
close
()Close the HDF5 file and remove temporary files/directories if the exist.
Remove all modules
remove_module
(mod_name)Remove requested module
reset
()Restore file such that only empty version of the 'MSI' and 'Raw data + config' group exist.
List of valid modules and their input arguments. For example,::.
Attributes Documentation
- modules¶
Dictionary containing the module objects associated with the added modules.
- path¶
Path to HDF5 file
- tempdir¶
Temporary directory containing
tempfile
.None
if a real directory is specified upon creation.
- tempfile¶
Temporary HDF5 file.
None
if a real file is specified upon creation.
Methods Documentation
- add_module(mod_name, mod_args=None)¶
Adds all the groups and datasets to the HDF5 file for the requested module.
- cleanup()¶
Close the HDF5 file and cleanup any temporary directories and files.
- clear_control_modules()¶
Remove all control device modules
- clear_digi_modules()¶
Remove all digitizer modules
- clear_msi_modules()¶
Remove all MSI modules
- close()¶
Close the HDF5 file and remove temporary files/directories if the exist.
- remove_all_modules()¶
Remove all modules
- remove_module(mod_name)¶
Remove requested module
- reset()¶
Restore file such that only empty version of the ‘MSI’ and ‘Raw data + config’ group exist.
- valid_modules()¶
List of valid modules and their input arguments. For example,:
valid_modules = [ {'name': 'Waveform', 'args': {'n_configs': 1, 'sn_size': 100}}, ]