-
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
for loop for azimuthal averaging in isotropic functions #70
Conversation
I think we may be able to improve this in the future using my new xhistogram package. For now it's fine as is. |
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
+ Coverage 95.66% 96.48% +0.82%
==========================================
Files 2 2
Lines 692 712 +20
Branches 119 123 +4
==========================================
+ Hits 662 687 +25
+ Misses 16 14 -2
+ Partials 14 11 -3
Continue to review full report at Codecov.
|
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.
Just a few small comments.
xrft/xrft.py
Outdated
for i in range(M[1]): | ||
iso_ps[j,i] = _azimuthal_avg(kidx, f[j,i], area, kr) | ||
else: | ||
raise ValueError("Arrays with more than 4 dimensions is not supported.") |
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.
are not supported
xrft/xrft.py
Outdated
for i in range(M[1]): | ||
iso_cs[j,i] = _azimuthal_avg(kidx, f[j,i], area, kr) | ||
else: | ||
raise ValueError("Arrays with more than 4 dimensions is not supported.") |
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.
Since you have this code repeated in two functions, you should probably break it into a private standalone function.
I inserted a for loop for the
isotropic
functions so that it can take arrays up to 4 dimensions.