podpac.compositor.OrderedCompositor

class podpac.compositor.OrderedCompositor(**kwargs)[source]

Bases: podpac.core.compositor.Compositor

Compositor that combines sources based on their order in self.sources. Once a request contains no nans, the result is returned.

Alternative Constructors

from_definition(definition)

Create podpac Node from a dictionary definition.

from_json(s)

Create podpac Node from a JSON definition.

Methods

__init__(**kwargs)

Do not overwrite me

composite(coordinates, data_arrays[, result])

Composites data_arrays in order that they appear.

create_output_array(coords[, data])

Initialize an output data array

eval(coordinates[, output])

Evaluates this nodes using the supplied coordinates.

eval_group(group)

Evaluate the node for each of the coordinates in the group.

find_coordinates()

Get the available native coordinates for the Node.

from_url(url)

Create podpac Node from a WMS/WCS request.

get_cache(key[, coordinates])

Get cached data for this node.

get_shared_coordinates()

Coordinates shared by each source.

get_source_coordinates()

Returns the coordinates describing each source.

has_cache(key[, coordinates])

Check for cached data for this node.

init()

Overwrite this method if a node needs to do any additional initialization after the standard initialization.

iteroutputs(coordinates)

Summary

load(path)

Create podpac Node from file.

put_cache(data, key[, coordinates, overwrite])

Cache data for this node.

rem_cache(key[, coordinates, mode])

Clear cached data for this node.

save(path)

Write node to file.

select_sources(coordinates)

Downselect compositor sources based on requested coordinates.

Attributes

base_definition

Base node defintion for Compositor nodes.

base_ref

Default reference/name in node definitions

cache_ctrl

A trait whose value must be an instance of a specified class.

cache_native_coordinates

A boolean (True, False) trait.

cache_output

A boolean (True, False) trait.

cache_update

A boolean (True, False) trait.

definition

Full node definition.

dtype

A trait which allows any value.

hash

interpolation

A trait type representing a Union type.

is_source_coordinates_complete

A boolean (True, False) trait.

json

definition for this node in json format

json_pretty

output

A trait for unicode strings.

outputs

An instance of a Python list.

pipeline

Deprecated.

shared_coordinates

A trait whose value must be an instance of a specified class.

source_coordinates

A trait whose value must be an instance of a specified class.

sources

A coercing numpy array trait.

strict_source_outputs

A boolean (True, False) trait.

style

A trait whose value must be an instance of a specified class.

units

A trait for unicode strings.

Members

__init__(**kwargs)

Do not overwrite me

composite(coordinates, data_arrays, result=None)[source]

Composites data_arrays in order that they appear.

Parameters
  • coordinates (podpac.Coordinates) – The set of coordinates requested by a user. The Node will be evaluated using these coordinates.

  • data_arrays (generator) – Generator that gives UnitDataArray’s with the source values.

  • result (podpac.UnitsDataArray, optional) – Default is None. Optional input array used to store the output data. When supplied, the node will not allocate its own memory for the output array. This array needs to have the correct dimensions, coordinates, and coordinate reference system.

Returns

Unit-aware xarray DataArray containing the results of the node evaluation. This composites the sources together until there are no nans or no more sources.

Return type

podpac.UnitsDataArray