pyrfu.pyrf.increments#

pyrfu.pyrf.increments(inp, scale: int = 10)[source]#

Returns the increments of a time series.

\[y_i = x_{i+s} - x_i\]

where \(s\) is the scale. The increment is given at the time of \(x_i\).

Parameters:
  • inp (xarray.DataArray) – Input time series.

  • scale (int, Optional) – Scale at which to compute the increments, in number of samples. Default is 10.

Returns:

  • kurt (ndarray) – Kurtosis (flatness) of the increments, one per product, using Pearson’s definition \(<y^4> / <y^2>^2\) (3 for a normal distribution), ignoring NaNs.

  • result (xarray.DataArray) – An xarray containing the time series increments, one per product in the original time series.

Raises:

ValueError – If scale is not a positive integer.