hdmf.common package
Subpackages
Submodules
- hdmf.common.alignedtable module
AlignedDynamicTableAlignedDynamicTable.category_tablesAlignedDynamicTable.categoriesAlignedDynamicTable.add_categoryAlignedDynamicTable.get_categoryAlignedDynamicTable.add_columnAlignedDynamicTable.add_rowAlignedDynamicTable.get_colnamesAlignedDynamicTable.to_dataframeAlignedDynamicTable.__getitem__AlignedDynamicTable.getAlignedDynamicTable.has_foreign_columnsAlignedDynamicTable.get_foreign_columnsAlignedDynamicTable.get_linked_tablesAlignedDynamicTable.get_meanings_for_columnAlignedDynamicTable.data_typeAlignedDynamicTable.namespace
- hdmf.common.hierarchicaltable module
- hdmf.common.multi module
- hdmf.common.resources module
KeyTableKeyEntityTableEntityFileTableFileObjectTableObjectObjectKeyTableEntityKeyTableEntityKeyObjectKeyHERDHERD.keysHERD.filesHERD.entitiesHERD.objectsHERD.object_keysHERD.entity_keysHERD.assert_external_resources_equalHERD.add_ref_containerHERD.add_ref_termsetHERD.add_refHERD.get_keyHERD.get_entityHERD.get_object_typeHERD.get_object_entitiesHERD.to_dataframeHERD.to_zipHERD.get_zip_directoryHERD.from_zipHERD.data_typeHERD.namespace
- hdmf.common.sparse module
- hdmf.common.table module
VectorDataVectorIndexElementIdentifiersDynamicTableDynamicTable.descriptionDynamicTable.idDynamicTable.colnamesDynamicTable.columnsDynamicTable.meanings_tablesDynamicTable.add_meanings_tableDynamicTable.get_meanings_tableDynamicTable.get_meanings_for_columnDynamicTable.add_rowDynamicTable.add_columnDynamicTable.create_regionDynamicTable.__getitem__DynamicTable.getDynamicTable.get_foreign_columnsDynamicTable.has_foreign_columnsDynamicTable.get_linked_tablesDynamicTable.to_dataframeDynamicTable.generate_html_reprDynamicTable.from_dataframeDynamicTable.copyDynamicTable.data_typeDynamicTable.namespace
DynamicTableRegionEnumDataMeaningsTable
Module contents
This package will contain functions, classes, and objects for reading and writing data in according to the HDMF-common specification
- hdmf.common.load_type_config(config_path, type_map=None)
This method will either load the config at the given path into either the global type map or a specific type map.
- hdmf.common.get_loaded_type_config(type_map=None)
This method returns a dictionary with the configuration for each namespace and data type.
- Parameters:
type_map (
TypeMap) – The TypeMap.
- hdmf.common.unload_type_config(type_map=None)
Unload all type configurations from the global type map or a specific type map.
- Parameters:
type_map (
TypeMap) – The TypeMap.
- hdmf.common.register_class(data_type, namespace='hdmf-common', container_cls=None)
Register an Container class to use for reading and writing a data_type from a specification If container_cls is not specified, returns a decorator for registering an Container subclass as the class for data_type in namespace.
- hdmf.common.register_map(container_cls, mapper_cls=None)
Register an ObjectMapper to use for a Container class type If mapper_cls is not specified, returns a decorator for registering an ObjectMapper class as the mapper for container_cls. If mapper_cls specified, register the class as the mapper for container_cls
- hdmf.common.load_namespaces(namespace_path)
Load namespaces from file
- hdmf.common.available_namespaces()
- hdmf.common.get_class(data_type, namespace, post_init_method=None)
Get the class object of the Container subclass corresponding to a given neurdata_type.
For developers: get_class can eventually lead to the ClassGeneratorManager.
get_class calls get_dt_container_cls.
get_dt_container_cls will get the container class from data type specification. If it is None, then one will be generated.
if one is generated, then the spec is pulled from the catalog
the parent class and attr_names are pulled from the spec
generate_class is called from the ClassGeneratorManager
Remember that the generation of a class means the __init__ is being created for you. You don’t ever see it. The generation also builds the docval for the __init__ and prepares the __fields__ dict for creating setters, which are handled in AbstractContainer.
- hdmf.common.get_type_map(copy=True)
Get a BuildManager to use for I/O using the core namespace.
- hdmf.common.get_manager(copy=True)
Get a BuildManager to use for I/O using the given extensions. If no extensions are provided, return a BuildManager that uses the core namespace
- Parameters:
copy (
bool) – Whether to return a deepcopy of the TypeMap. If False, a direct reference may be returned (use with caution).- Returns:
a build manager with namespaces loaded from the given file
- Return type:
- hdmf.common.validate(io, namespace='hdmf-common', experimental=False)
Validate an file against a namespace
- hdmf.common.get_hdf5io(path=None, mode='r', manager=None, comm=None, file=None, driver=None, aws_region=None, herd_path=None)
A convenience method for getting an HDF5IO object using an HDMF-common build manager if none is provided.
- Parameters:
mode (
str) – the mode to open the HDF5 file with, one of (“w”, “r”, “r+”, “a”, “w-”, “x”). See h5py.File for more details.manager (
TypeMaporBuildManager) – the BuildManager or a TypeMap to construct a BuildManager to use for I/Ocomm (
Intracomm) – the MPI communicator to use for parallel I/Ofile (
FileorS3FileorRemFile) – a pre-existing h5py.File, S3File, or RemFile objectdriver (
str) – driver for h5py to use when opening HDF5 fileaws_region (
str) – If driver is ros3, then specify the aws region of the url.herd_path (
str) – The path to read/write the HERD file