emd.spectra.define_hist_bins_from_data#

emd.spectra.define_hist_bins_from_data(X, nbins=None, mode='sqrt', scale='linear', tol=0.001, max_bins=2048)[source]#

Find the bin edges and centre frequencies for use in a histogram.

If nbins is defined, mode is ignored

Parameters
Xndarray

Dataset whose summary stats will define the histogram

nbinsint

Number of bins to create, if undefined this is derived from the data (Default value = None)

mode{‘sqrt’}

Method for deriving number of bins if nbins is undefined (Default value = ‘sqrt’)

scale{‘linear’,’log’}

(Default value = ‘linear’)

Returns
edgesndarray

1D array of bin edges

centresndarray

1D array of bin centres