Skip to content

DEP: rename hanning windows to hann window while keeping compatibility #29123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

atsju
Copy link

@atsju atsju commented Jun 4, 2025

Close #17303

@atsju atsju marked this pull request as ready for review June 4, 2025 08:10
Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as the typing changes are concerned, I'm completely on board.

I'm not an expert in signal processing. But assuming that this is indeed the correct name, then this deprecation route seems like the right approach to me.

Thanks!

Copy link
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but needs a test as everything does.

It may make sense to go the SciPy route, and just add hann first and not document hanning much, and start deprecation later (the advantage is that libraries can switch to hann directly and don't need conditionals). Although 14k hits on github isn't that much. I honestly don't have a strong opinion either way.

(For the most part, I think scipy.signal.windows is the right place, but these have been around forever and we should keep some... Would be nice to link out to there, but not this PR.)

However, the term Hanning function is also conventionally used, derived
from the paper in which the term hanning a signal was used to mean applying
the Hann window to it. It is distinct from the similarly-named Hamming
function, named after Richard Hamming.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just two sentences and not sure what the "limit" is, but please don't just copy from wikipedia (wikipedia does require attribution!).

Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Comment on lines +3313 to +3318
The Hann window was named for Julius von Hann, an Austrian meteorologist.
It is also known as the Hanning window, which is a misnomer.
However, the term Hanning function is also conventionally used, derived
from the paper in which the term hanning a signal was used to mean applying
the Hann window to it. It is distinct from the similarly-named Hamming
function, named after Richard Hamming.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Hann window was named for Julius von Hann, an Austrian meteorologist.
It is also known as the Hanning window, which is a misnomer.
However, the term Hanning function is also conventionally used, derived
from the paper in which the term hanning a signal was used to mean applying
the Hann window to it. It is distinct from the similarly-named Hamming
function, named after Richard Hamming.
The Hann window was named for Julius von Hann, an Austrian meteorologist.
It is often mistakenly called the "Hanning" window. This confusion likely
arises from its similarity to the Hamming window, named after Richard Hamming.

Would this be OK ?

@atsju
Copy link
Author

atsju commented Jun 5, 2025

Thanks, but needs a test as everything does.

It may make sense to go the SciPy route, and just add hann first and not document hanning much, and start deprecation later (the advantage is that libraries can switch to hann directly and don't need conditionals). Although 14k hits on github isn't that much. I honestly don't have a strong opinion either way.

(For the most part, I think scipy.signal.windows is the right place, but these have been around forever and we should keep some... Would be nice to link out to there, but not this PR.)

This PR has already been a little personal challenge and I don't know how you maintainers work in this repo. I'm not sure to understand everything here. Just let me know clearly if there is any more to do on my side. (I will not be available during upcoming 2 weeks though).

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.

Feature Request: add hann alias for incorrectly named hanning function, update hanning documentation
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy