Skip to content
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

clouddrift.wavelet + xarray #280

Open
selipot opened this issue Sep 22, 2023 · 1 comment
Open

clouddrift.wavelet + xarray #280

selipot opened this issue Sep 22, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@selipot
Copy link
Member

selipot commented Sep 22, 2023

I am sharing a snippet of code showing how the wavelet transform function from clouddrift can be used with xarray dataarrays. It doesn't work directly because of the np.moveaxis function to start with. The proposed solution is to use xr.apply_ufunc, which seems to work with dask arrays as well. A remaining issue that I have not solved is that I would like to use morse_wavelet then wavelet_transform in order to calculate the wavelet only once in this case of time series of common length, instead of using morse_wavelet_transform which calculates the wavelet for each iteration, so not necessarily efficient.

https://gist.github.com/selipot/93c061f7715b95ce3ec3bcf169c1165a

I'd like to discuss!

@milancurcic
Copy link
Member

I can reproduce your behavior and don't yet understand what's causing the error with the last one. Will need to study it more.

@kevinsantana11 kevinsantana11 added the bug Something isn't working label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants