ewoksfluo.gui.data_viewer.ViewerGroup#

class ewoksfluo.gui.data_viewer.ViewerGroup(name, parent)[source]#

Bases: Group

Proxy to a HDF5 group that does not keep the file opened.

add_node(node)#

Add a child to this group.

Parameters:

node (Node) – Child to add to this group

property attrs#

Returns HDF5 attributes of this node.

Return type:

dict

property basename#

Returns the HDF5 basename of this node.

create_dataset(name, shape=None, dtype=None, data=None, **kwds)#

Create and return a sub dataset.

Parameters:
  • name (str) – Name of the dataset.

  • shape – Dataset shape. Use “()” for scalar datasets. Required if “data” isn’t provided.

  • dtype – Numpy dtype or string. If omitted, dtype(‘f’) will be used. Required if “data” isn’t provided; otherwise, overrides data array’s dtype.

  • data (numpy.ndarray) – Provide data to initialize the dataset. If used, you can omit shape and dtype arguments.

  • kwds – Extra arguments. Nothing yet supported.

create_group(name)#

Create and return a new subgroup.

Name may be absolute or relative. Fails if the target name already exists.

Parameters:

name (str) – Name of the new group

property file#

Returns the file node of this node.

Return type:

Node

get(name, default=None, getclass=False, getlink=False)#

Retrieve an item or other information.

If getlink only is true, the returned value is always h5py.HardLink, because this implementation do not use links. Like the original implementation.

Parameters:
  • name (str) – name of the item

  • default (object) – default value returned if the name is not found

  • getclass (bool) – if true, the returned object is the class of the object found

  • getlink (bool) – if true, links object are returned instead of the target

Returns:

An object, else None

Return type:

object

property h5_class#

Returns the HDF5 class which is mimicked by this class.

Return type:

H5Type

property h5py_class#

Returns the h5py classes which is mimicked by this class. It can be one of h5py.File, h5py.Group or h5py.Dataset

This should not be used anymore. Prefer using h5_class

Return type:

Class

items()#

Returns items iterator containing name-node mapping.

Return type:

iterator

keys()#

Returns an iterator over the children’s names in a group.

property name#

Returns the HDF5 name of this node.

property parent#

Returns the parent of the node.

Return type:

Node

values()#

Returns an iterator over the children nodes (groups and datasets) in a group.

Added in version 0.6.

visit(func, visit_links=False)#

Recursively visit all names in this group and subgroups. See the documentation for h5py.Group.visit for more help.

Parameters:

func (callable) – Callable (function, method or callable object)

visititems(func, visit_links=False)#

Recursively visit names and objects in this group. See the documentation for h5py.Group.visititems for more help.

Parameters:
  • func (callable) – Callable (function, method or callable object)

  • visit_links (bool) – If False, ignore links. If True, call func(name) for links and recurse into target groups.