scope.emd package

Submodules

scope.emd.emd_energy_spectrum module

scope.emd.emd_energy_spectrum.emd_energy_spectrum(modes, t, plot_fitting=False)[source]

Computes EMD power spectrum (modal energy densities).

This function calculates the modal energy density of input intrinsic mode functions (IMFs). The dominant modal period (and its uncertainty) of all input modes are stored.

Parameters:
  • modes (numpy array) – Input IMFs (EMD modes)

  • t (numpy array) – Time

  • plot_fitting (bool, optional) – Plots each global wavelet spectrum and its best fit for all modes in a subplot. The default is False.

Returns:

emd_energy_spectrum_result

scope.emd.emd_energy_spectrum.period

Modal period of all IMFs

Type:

numpy array

scope.emd.emd_energy_spectrum.period_err

Uncertainty of modal period

Type:

numpy array

scope.emd.emd_energy_spectrum.energy

Modal energy density of all IMFs

Type:

numpy array

Return type:

dict

scope.emd.emd_modes module

scope.emd.emd_modes.emd_modes(x, sd_thresh=0.0001)[source]

Returns set of EMD modes for a given timeseries x.

This function wraps sift function from emd library and returns a set of emd modes.

Parameters:
  • x (numpy array) – Time series data

  • sift (floaf) – sifting factor

Returns:

modes – Set of emd modes

Return type:

numpy array

scope.emd.emd_noise_conf module

scope.emd.emd_period_energy module

scope.emd.emd_period_energy.emd_period_energy(s, t, plot_spectrum=False)[source]

Calculates the dominant period and energy of input intrinsic mode function (IMF).

The function calculates the energy of IMF and performs the wavelet transform to compute its period and global wavelet spectrum. The global wavelet spectrum is fitted to estimate the dominant period.

Parameters:
  • s (numpy array) – Input IMF

  • t (numpy array) – Time

  • plot_spectrum (bool, optional) – Plots the global wavelet spectrum and wavelet power spectrum. The default is False.

Returns:

emd_period_energy_result

scope.emd.emd_period_energy.energy

Energy of the input IMF

Type:

float

scope.emd.emd_period_energy.dominant_period

Modal period associated with maximum power in global wavelet spectrum

Type:

float

scope.emd.emd_period_energy.dominant_period_err

Uncertainty of dominant modal period

Type:

float

scope.emd.emd_period_energy.period

Modal period

Type:

numpy array

scope.emd.emd_period_energy.global_ws

Global wavelet spectrum of input IMF

Type:

numpy array

scope.emd.emd_period_energy.best_fit

Values of the function that fits the global wavelet spectrum

Type:

numpy array

Return type:

dict

scope.emd.emd_period_energy.fit_global_ws(period, global_ws)[source]

A global wavelet spectrum fitting algorithm.

This function fits the global wavelet spectrum of intrinsic mode function (IMF) by a Gaussian + quadratic function, in order to extract the dominant modal period from the position of Gaussian peak.

Parameters:
  • period (numpy array) – Modal period

  • global_ws (numpy array) – Global wavelet spectrum of IMF

Returns:

  • dominant_period (float) – Estimated dominant modal period

  • dominant_period_err (float) – Uncertainty of the dominant modal period

  • best_fit (numpy array) – The Gaussian + quadratic function that fits the global wavelet spectrum

scope.emd.emd_trend module

scope.emd.waveletFunctions module

scope.emd.waveletFunctions.chisquare_inv(P, V)[source]
scope.emd.waveletFunctions.chisquare_solve(XGUESS, P, V)[source]
scope.emd.waveletFunctions.wave_bases(mother, k, scale, param)[source]
scope.emd.waveletFunctions.wave_signif(Y, dt, scale, sigtest=0, lag1=0.0, siglvl=0.95, dof=None, mother='MORLET', param=None, gws=None)[source]
scope.emd.waveletFunctions.wavelet(Y, dt, pad=0, dj=-1, s0=-1, J1=-1, mother=-1, param=-1, freq=None)[source]

Module contents