timeflux.nodes.accumulate


Accumulation nodes that either, stack, append or, concatenate data after a gate

accumulate

class timeflux.nodes.accumulate.AppendDataFrame(meta_keys=None, **kwargs)[source]

Bases: timeflux.core.node.Node

Accumulates and appends data of type DataFrame after a gate.

This node should be plugged after a Gate. As long as it receives data, it appends them to an internal buffer. When it receives a meta with key gate_status set to closed, it releases the accumulated data and empty the buffer.

Variables
  • i (Port) – Default data input, expects DataFrame and meta

  • o (Port) – Default output, provides DataFrame

Parameters

**kwargs – key word arguments to pass to pandas.DataFrame.append method.

Create instance and initialize the logger.

update(self)[source]
class timeflux.nodes.accumulate.AppendDataArray(dim, meta_keys=None, **kwargs)[source]

Bases: timeflux.core.node.Node

Accumulates and appends data of type XArray after a gate.

This node should be plugged after a Gate. As long as it receives DataArrays, it appends them to a buffer list. When it receives a meta with key gate_status set to closed, it concatenates the list of accumulated DataArray, releases it and empty the buffer list.

Variables
  • i (Port) – Default data input, expects DataArray and meta

  • o (Port) – Default output, provides DataArray

Parameters
  • dim – Name of the dimension to concatenate along.

  • **kwargs – key word arguments to pass to xarray.concat method.

Create instance and initialize the logger.

update(self)[source]