Factory classes¶
- class pninexus.nexus.BaseClassFactory¶
- static create(parent, name, base_class, lcpl=None, gcpl=None, gapl=None)¶
create a new base class
- Parameters:
parent (Group) – the parent group for the new base class
name (str) – the name of the new base class
base_class (str) – the class the new group belongs to
lcpl (h5cpp.property.LinkCreationList) – optional reference to a link creation property list
gcpl (h5cpp.property.GroupCreationList) – optional reference to a group creation property list
gapl (h5cpp.property.GroupAccessList) – optional reference to a group access property list
- Retrun:
new group instance properly setup as a NeXus base class
- Return type:
Group
- Raises:
RuntimeError – in case of a failure
- class pninexus.nexus.FieldFactory¶
- static create(parent, name, dtype, shape=None, max_shape=None, chunk=None, units=None, lcpl=None, dcpl=None, dapl=None)¶
create a new nexus field
Creates a nexus compliant field (dataset). The name of the field is checked against NeXus’s naming policy and an exception is thrown if this is not the case. See the users manual about how to use this class.
- Parameters:
parent (Group) – the parent group
name (str) – the name of the field
type (numpy.dtye,str) – numpy datatype for the field
shape (tuple) – the shape of the dataset
chunk (tuple) – the chunk size for the dataset
lcpl (h5cpp.property.LinkCreationList) – optional reference to a link creation property list
dcpl (h5cpp.property.DatasetCreationList) – optional reference to a dataset creation property list
dapl (h5cpp.property.DatasetAccessList) – optional reference to a dataset access property list
- Returns:
new dataset instance
- Return type:
Dataset
- Raises:
RuntimeError – in case of a failure