PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
2.04k stars 470 forks source link

Improve `center_frequency` accuracy, fix edge case #575

Open OverLordGoldDragon opened 3 years ago

OverLordGoldDragon commented 3 years ago

Details. In summary, below are addressed:

  1. Failure to estimate center frequency within two significant figures
  2. Using negative frequency index if wavelet's peak frequency is positive max for even len(psi)
  3. Added comments explaining steps

Two sig figs should be bare minimum in precise frequency applications. Case (2) should be rare, but more importantly, it fails to make sense, unless I'm missing something.