emd.cycles.get_cycle_stat#

emd.cycles.get_cycle_stat(cycles, values, mode='cycle', out=None, func=<function mean>)[source]#

Compute the average of a set of observations for each cycle.

Parameters:
cyclesndarray

array whose content index cycle locations

valuesndarray

array of observations to average within each cycle

mode{‘compressed’,’full’}

Flag to indicate whether to return a single value per cycle or the average values filled within a vector of the same size as values (Default value = ‘compressed’)

funcfunction

Function to call on the data in values for each cycle (Default np.mean). This can be any function, built-in or user defined, that processes a single vector of data returning a single value.

Returns:
ndarray

Array containing the cycle-averaged values