viscid.tree module¶
Classes for elements along the tree from files to fields
-
class
viscid.tree.
Leaf
(name=None, time=None, info=None, parents=None, **kwargs)[source]¶ Bases:
viscid.tree.Node
Base class for fields
-
class
viscid.tree.
Node
(name=None, time=None, info=None, parents=None, **kwargs)[source]¶ Bases:
object
Base class for Datasets and Grids
-
basetime
¶
-
find_attr
(attr_name, default=<class 'viscid.tree._NO_DEFAULT_GIVEN'>)[source]¶ Breadth first search of parents for attr_name
Parameters: - attr_name (str) – some attribute name
- default (Any) – fallback, possibly raises AttributeError if this is not given
Raises: AttributeError
– if no default given, and no parent found with attr_nameReturns: The attribute, or default
-
find_info
(key, default=<class 'viscid.tree._NO_DEFAULT_GIVEN'>)[source]¶ Go through the parents (breadth first) and find the info
-
find_info_owner
(key)[source]¶ Go through the parents (breadth first) and find the info
Raises: KeyError
-
name
= None¶
-
parents
= None¶
-
time
¶
-