Skip to content

Conversation

OverLordGoldDragon
Copy link
Contributor

@OverLordGoldDragon OverLordGoldDragon commented Oct 14, 2020

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.

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)`

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.
@rgommers
Copy link
Member

rgommers commented Aug 4, 2025

Thanks @OverLordGoldDragon. From your StackExchange post, this looks like a nice improvement. This change will need some unit tests, possibly derived from the explanation in that post (there's no code, but there is math there that can be easily translated into code).

I'm not the author of nor the expert on this code, but I'm trying to catch up on the backlog of issues and PRs about it. Will see what I can do here.

@rgommers rgommers changed the title Improve center_frequency accuracy, fix edge case ENH: improve center_frequency accuracy, fix edge case Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants