pyrfu.pyrf.struct_func module#

pyrfu.pyrf.struct_func.struct_func(inp, scales, order)[source]#

Returns the structure function of a time series

\[y= \frac{1}{N-s}\sum_{i=1}^{N-s}(x_i - x_{i+s})^o\]

where \(s\) is the scale, and \(o\) is the order.

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

  • scales (array_like) – A list or an array containing the scales to calculate.

  • order (int) – Order of the exponential of the structure function.

  • ncut (int, Optional) – Number of standard deviation to cut (Kiyani et al., XXXX)

Returns:

values – An xarray containing the structure functions, one per product in the original time series. The index coordinate contains the scale value, and the attribute ‘order’ keeps a record on the order used for its calculation.

Return type:

xarray.DataArray