podpac.algorithm.ExpandCoordinates

class podpac.algorithm.ExpandCoordinates(**kwargs)[source]

Bases: podpac.core.algorithm.coord_select.ModifyCoordinates

Evaluate a source node with expanded coordinates.

This is normally used in conjunction with a reduce operation to calculate, for example, the average temperature over the last month. While this is simple to do when evaluating a single node (just provide the coordinates), this functionality is needed for nodes buried deeper in a pipeline.

lat, lon, time, altList
Expansion parameters for the given dimension: The options are::
  • [start_offset, end_offset, step] to expand uniformly around each input coordinate.

  • [start_offset, end_offset] to expand using the available source coordinates around each input coordinate.

Methods

__init__(**kwargs)

Do not overwrite me

algorithm(inputs)

param inputs

Evaluated outputs of the input nodes. The keys are the attribute names.

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 inputs to the Node.

get_cache(key[, coordinates])

Get cached data for this node.

get_modified_coordinates1d(coords, dim)

Returns the expanded coordinates for the requested dimension, depending on the expansion parameter for the given dimension.

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.

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

Cache data for this node.

rem_cache(key[, coordinates, mode])

Clear cached data for this node.

Attributes

alt

An instance of a Python list.

base_definition

Base node definition.

base_ref

Default pipeline node reference/name in pipeline node definitions

cache_ctrl

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

cache_output

A boolean (True, False) trait.

cache_update

A boolean (True, False) trait.

coordinates_source

definition

Full pipeline definition for this node.

dtype

A trait which allows any value.

hash

json

definition for this node in json format

json_pretty

lat

An instance of a Python list.

lon

An instance of a Python list.

pipeline

Create a pipeline node from this node

source

style

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

time

An instance of a Python list.

units

A trait for unicode strings.

Members

__init__(**kwargs)

Do not overwrite me

get_modified_coordinates1d(coords, dim)[source]

Returns the expanded coordinates for the requested dimension, depending on the expansion parameter for the given dimension.

Parameters

dim (str) – Dimension to expand

Returns

expanded – Expanded coordinates

Return type

Coordinates1d