aidapy.aidaxr.xevents module

class aidapy.aidaxr.xevents.AidaAccessorStatistics(xarray_obj)[source]

Bases: object

increm(scale)[source]

Returns the increments of a timeseries

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

where \(s\) is the scale.

Parameters

scale (int) – Scale at which to compute the increments.

Returns

kurt – kurtosis of the increments, one per product, using the Fisher’s definition (0 value for a normal distribution).

Return type

np.array

resultxarray.DataArray

An xarray containing the time series increments, one per product in the original timeseries.

pvi(scale)[source]

Returns the PVI of a timeseries

\[y = \frac{|x_i - x_{i+s}|^2}{<|x_i - x_{i+s}|^2>}\]

where \(s\) is the scale.

Parameters

scale (int) – Scale at which to compute the PVI.

Returns

values – An xarray containing the pvi of the original timeseries.

Return type

xarray.DataArray

threshold(theta)[source]

Returns the location of the PVI peaks above the threshold theta theta is usually 8 for extreme events, as reported in literature.

Parameters

theta (int) – Threshold value for PVI.

Returns

result – A numpy array containing the location of the pvi peaks above theta.

Return type

np.array