Window Function Handler

On this page

Interface for custom window functions for PM threshold processing. Window function is a function accepting a Window - the list of measures, and returning float value.


Implements custom window function

Parameters:window – List of (timestamp, value), where timestamp - Unix timestamp of measure value - Value of measure
Returns:float value



Returns last measured value:

def last(window):
    return window[-1][1]


Difference between last and first value:

def finite_difference(window):
    return window[-1][1] - window[0][1]

More Examples

Refer to core/ file for more examples