Groups
var hdf5 = require('hdf5').hdf5;
Attributes
- id
Group.prototype.create(xpath)
- xpath → the relative path to the group to create. Delimited with / and if any group along the stem doesn’t exist creates it too
- return ← the new group object
Group.prototype.open(xpath, file)
- xpath → the relative path to the group to open. Delimited with / and will throw an exception if it doesn’t exist. Useful particularly in read only mode
- file → the file in which it exists.
- return ← the opened group object
Group.prototype.openGroup(xpath, [{separate_attributes: true}])
- xpath → the relative path to the group to open. Delimited with / and will throw an exception if it doesn’t exist. Useful particularly in read only mode
- options → with separate_attributes option returning a destructuring assignment array
- return ← the opened group object or [group, attrs]
Group.prototype.flush()
Flushes subtree and metadata from javascript to h5 components in memory and on to the h5 file.
Group.prototype.refresh()
Refreshes subtree and metadata from h5 file to h5 components in memory and on to the javascript. Reverse action to flush.
Group.prototype.copy(source, id, destination)
- source → the name of the source group
- id → the group or file id location. Every group and the file return with an id attribute. In this case it is the destination’s future location.
- destination → the name of the destination group.
Group.prototype.move(source, id, destination)
- source → the name of the source group
- id → the group or file id location. Every group and the file return with an id attribute. In this case it is the destination’s future location. If it is the group’s id this essentially renames the source
- destination → the name of the destination group.
Group.prototype.link(source, id, destination)
- source → the name of the source group
- id → the group or file id location. Every group and the file return with an id attribute. In this case it is the destination’s future location.
- destination → the name of the destination group.
Group.prototype.delete(name)
- name → the name of the group to delete. An apprehensive activity with an h5 file but sometimes it is necessary
Group.prototype.close”()
Group.prototype.getNumAttrs()
- return ← # of attributes
Group.prototype.getAttributeNames()
- return ← list of attribute names
Group.prototype.readAttribute(name)
- name → the name of the attributes
- return ← attribute according to its datatype.
Group.prototype.deleteAttribute(name)
Deletes the attribute from this group. Alternatively you can delete with the javascript delete command:
delete group.unitCell;
and it will be deleted in the h5 without any furter step
- name → the name of the attribute
Group.prototype.getNumObjs()
- return ← # of children
Group.prototype.getMemberNames()
- return ← an array with the names in alphabetic order
Group.prototype.getMemberNamesByCreationOrder()
- return ← an array with the names in creation order
Group.prototype.getChildType(name)
- name → the name of the child
- return ← the type according to H5OType and indicates group, dataset or named datatype
Group.prototype.getDatasetType(name)
- name → the name of the child dataset
- return ← the high level type according to HLType and indicates group, dataset or named datatype. Useful when working with h5 in general and programmatically would like to know which part of the api to use
Group.prototype.getDatasetDimensions(name)
- name → the name of the child dataset
- return ← an array of length dataset rank and entries for the length of each dimension
Group.prototype.getDataType(name)
- name → the name of the child
- return ← the type according to H5Type. Useful when working with h5 in general and programmatically would like to prepare for particular data type
Group.prototype.getDatasetAttributes(name)
Attributes on any dataset. These can be arrays of elements.
- name → the name of the child dataset
- return ← object with attributes.
Group.prototype.getDatasetAttribute(name, attr_name)
Dataset attribute by its name.
- name → the name of the child dataset
- attr_name → the name of the attribute
- return ← the value of attribute.
Group.prototype.getFilters(name);
- name → the name of the child dataset
- return ← a Filters object for accessing the dataset’s filters.
Group.prototype.iterate(idx, function(type, name));
Steps thru each child.
- idx → unused starting over index
- function → synchronous callback function returning H5Type and name.
Group.prototype.visit(idx, function(type, xpath));
Recursively steps thru each child and subgroup’s children.
- idx → unused starting over index
- function → synchronous callback function returning H5Type and xpath.