emd.cycles.bin_by_phase#

emd.cycles.bin_by_phase(ip, x, nbins=24, weights=None, variance_metric='variance', bin_edges=None)[source]#

Compute distribution of x by phase-bins in the Instantaneous Frequency.

Parameters:
ipndarray

Input vector of instataneous phase values

xndarray

Input array of values to be binned, first dimension much match length of IP

nbinsinteger

number of phase bins to define (Default value = 24)

weightsndarray (optional)

Optional set of linear weights to apply before averaging (Default value = None)

variance_metric{‘variance’,’std’,’sem’}

Flag to select whether the variance, standard deviation or standard error of the mean in computed across cycles (Default value = ‘variance’)

bin_edgesndarray (optional)

Optional set of bin edges to override automatic bin specification (Default value = None)

Returns:
avgndarray

Vector containing the average across cycles as a function of phase

varndarray

Vector containing the selected variance metric across cycles as a function of phase

bin_centresndarray

Vector of bin centres