Skip to content

Improve flexibility of the precision parameter in the CWT implementation. - #800

Closed
meiyasan wants to merge 3 commits into
PyWavelets:mainfrom
meiyasan:patch-1
Closed

Improve flexibility of the precision parameter in the CWT implementation.#800
meiyasan wants to merge 3 commits into
PyWavelets:mainfrom
meiyasan:patch-1

Conversation

@meiyasan

Copy link
Copy Markdown
Contributor

Hello @rgommers ,

I had many issues in controlling the precision of the wavelet (def wavefun()). This issue has been mentioned several times already, but never committed. I think this is a rather important fix allowing for more flexibility in playing with CWT.

So please find the minimal modification necessary allowing for better precision and removing artifacts in the low-frequency region (high scale values).

Please consider if possible, this is important parameter to adjust. In the current master, the value is hardcoded in _cwt.py to precision=10, this is not so good.

@meiyasanmeiyasan changed the title Update _cwt.pyImprove flexibility of the precision parameter in the CWT implementation.Apr 12, 2025

@agriyakhetarpalagriyakhetarpal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @meiyasan! Not a maintainer over here, but I think the change looks good in its current form.

@meiyasan

Copy link
Copy Markdown
ContributorAuthor

Hello @rgommers, can you consider merging this ?

@meiyasan

Copy link
Copy Markdown
ContributorAuthor

@rgommers ?

@rgommersrgommers modified the milestone: v1.9.0Aug 3, 2025
@rgommers

Copy link
Copy Markdown
Member

Thanks @meiyasan. Sorry for the delay, this package is in low-maintenance mode unfortunately.

This PR aims to do the same thing as gh-570. The docs are better on gh-570, the default and argument order are better in this PR. What I'll do is cherry-pick this commit on top of what's in this PR, fix things up and merge that. I'll close this PR once that is done.

@rgommers

Copy link
Copy Markdown
Member

the default and argument order are better in this PR

Actually not quite for the default value. In gh-531 it's discussed that it's good to increase the default value, and gh-570 does that. It wasn't exposed before and values should get more accurate only, so it's backwards compatible.

I just updated gh-570, so I'll close this. Thank you for the contribution though @meiyasan!

@rgommersrgommers closed this Aug 3, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@meiyasan@rgommers@agriyakhetarpal