finam.adapters#

Adapters to transform or interpolate data when passed between modules.

See also book chapter Known FINAM modules for a list of other adapters that are not included in the core package.

Base adapters#

Callback(callback)

Transform data using a callback.

Scale(scale)

Scales the input.

ValueToGrid(grid)

Convert a scalar value to a Matrix filled with that value.

GridToValue(func)

Convert a matrix to a scalar value using an aggregation function, e.g. numpy.mean.

Probe adapters#

CallbackProbe(callback)

Probe data by calling a callback.

Regridding adapters#

RegridNearest([in_grid, out_grid, tree_options])

Regrid data between two grid specifications with nearest neighbour interpolation.

RegridLinear([in_grid, out_grid, ...])

Regrid data between two grid specifications with linear interpolation.

Statistics adapters#

Histogram(lower, upper[, bins, density])

Calculates a histogram over grid values.

Time adapters#

LinearTime()

Linear time interpolation.

NextTime()

Time interpolation providing the next future value.

PreviousTime()

Time interpolation providing the newest past value.

StackTime()

Stacks all incoming data since the last push.

StepTime([step])

Step-wise time interpolation.

AvgOverTime([step])

Aggregates data over time to form the temporal average over the last pull time step.

SumOverTime([step, per_time, initial_interval])

Aggregates data over time to form the temporal sum (area under curve) over the last pull time step.

DelayFixed(delay)

Delays/offsets the request time by subtracting a fixed offset.

DelayToPush()

Delays/offsets the request time to the last push time if out of range.

DelayToPull([steps, additional_delay])

Delays/offsets the request time to a previous pull time.

TimeCachingAdapter()

Abstract base class for time handling and caching adapters.