-
Notifications
You must be signed in to change notification settings - Fork 45
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
isotropic_powerspectrum fails for extra dimensions #9
Comments
I think this issue is resolved unless the user tries to apply windowing to dask arrays in Python 2.7 environement. |
Do we have a test case for my example from my original comment? |
Now if I try this, I get the error
Do we consider this closed? |
I couldn't come up with a clean way to do it so yes, I coded it so that the user would have to use a |
Ok, let's leave the issue open for now then. |
I just hit this issue again. It seems weird that we can't take isotropic spectra with more than 2 dimensions, provided that we are only doing FT in 2 of the dimensions. |
It basically comes down to bincount. Here is one possible solution: The other possible solution would be to define a ufunc that does the azimuthal averaging and then call xarray.apply_ufunc. This would work well with dask, while the SO idea above would not. |
It seems that the I tried circumventing the issue by using
|
I also encountered this same problem of an efficient vectorized multi-dimensional bincount for calculating isotropic power spectra. Here's a prototype using The underlying implementation of the groupby aggregation relies on "numpy-groupies" and could be upstreamed into xarray: |
Wow numpy-groupies is amazing! Could be very useful in xhistogram as well! |
PR #128 fixed this issue. |
I think this is a self-contained minimum reproducible example of #6.
isotropic_powerspectrum
doesn't work when there are extra dimensions.error is
Same thing happens for
isotropic_crossspectrum
cc: @roxyboy
The text was updated successfully, but these errors were encountered: