satpy.node module

Nodes to build trees.

class satpy.node.CompositorNode(compositor)[source]

Bases: Node

Implementation of a compositor-specific node.

Set up the node.

_copy_name_and_data(node_cache=None)[source]
add_optional_nodes(children)[source]

Add nodes to the optional field.

add_required_nodes(children)[source]

Add nodes to the required field.

property compositor

Get the compositor.

property optional_nodes

Get the optional nodes.

property required_nodes

Get the required nodes.

exception satpy.node.MissingDependencies(missing_dependencies, *args, **kwargs)[source]

Bases: RuntimeError

Exception when dependencies are missing.

Set up the exception.

class satpy.node.Node(name, data=None)[source]

Bases: object

A node object.

Init the node object.

_copy_name_and_data(node_cache=None)[source]
add_child(obj)[source]

Add a child to the node.

copy(node_cache=None)[source]

Make a copy of the node.

display(previous=0, include_data=False)[source]

Display the node.

flatten(d=None)[source]

Flatten tree structure to a one level dictionary.

Parameters:

d (dict, optional) – output dictionary to update

Returns:

Node.name -> Node. The returned dictionary includes the

current Node and all its children.

Return type:

dict

property is_leaf

Check if the node is a leaf.

leaves(unique=True)[source]

Get the leaves of the tree starting at this root.

trunk(unique=True, limit_children_to=None)[source]

Get the trunk of the tree starting at this root.

update_name(new_name)[source]

Update ‘name’ property.

class satpy.node.ReaderNode(unique_id, reader_name)[source]

Bases: Node

Implementation of a storage-based node.

Set up the node.

_copy_name_and_data(node_cache)[source]
property reader_name

Get the name of the reader.