-
Notifications
You must be signed in to change notification settings - Fork 9
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
wavelet transform fixes #259
Conversation
Note that this requires |
In fact, with this modification of This works:
|
Yes, we could modify I don't really know enough about the wavelets, so I can't recommend which order would be better. But, I would look at other code and see what they do. |
I'm looking at In the docstring it says:
but then you have those examples:
which reading the docstring I would have expected the size to be |
It is actually defined:
but then gets reorder before outputting.
I would suggest we remove the moveaxis and rewrite everything to be consistent. |
Yes, that's a mistake. |
Indeed, that was my quick fix to make it work with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with wavelets but I reviewed the changes and ran tests locally. Let's release v0.22.0 once this is in.
It's looking harder than I thought to rewrite the whole function. I am wondering if @philippemiron you'd be happy if i kept the axis reordering at the end after making sure the docstrings are correct? It is working as it is. The only thing is that the time axis need to come first to be used with apply_ragged. |
We can always improve it further in a future PR. |
We are abandoning the idea of reorganizing the outputs of wavelet yet I am continuing this PR with cosmetic/consistency changes to the docstring. If that is acceptable to you we can merge. |
* wavelet transform output change * remove comment * more shape tests * docstring updates * ValueError for morse transform * Bump minor version * consistent docstrings * suppress warning * reverse+docstring * pyproject version --------- Co-authored-by: milancurcic <caomaco@gmail.com>
This PR addresses issue #256 by reordering the shape/axes of output of
[morse_]wavelet_transform
as((additional input axes),time,freq_axis,order_axis)
which allows this function to be used withapply_ragged
. The example below works. I am not 100% happy with my proposed fix because the wavelet argument ofwavelet_transform
should be by default(order_axis, freq_axis, time)
so that the output is kind of inconsistent with that. An alternative would be a bigger rewritemorse_wavelet
andwavelet_transform
.