You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use the quadpy package for creating Lebedev spherical grids. quadpy API changed a lot meanwhile, so I tried to fixed this issue with this PR. The fix is not the nicest, since the current quadpy API handling with quadpy.u3.get_good_scheme(degree) does not fully cover all available Lebedev grids. Thus, I decided to use more lower level features calling lebedev_xxx() function directly, these functions should last longer as the upper part of the API. The API also changed the coordinate handling, it now returns cartesian coordinates. So our function must convert to az, colat, r. That's why I also copied the sph2cart and cart2sph routines from sfs toolbox into the util.py
What do you think? Thanks for suggestions and help.
I was facing the same problem. Also the API seems to change quite frequently...
Eventually I gave up on chasing them (couldn't fix to a specific old version for other reasons.).
If this is interesting, I compiled a mat file of Lebedev grids that then gets loaded and returns the correct grid. Actually, quadpy is not doing anything else last time I checked, just returning hard coded values.
Feel free to copy: https://github.com/chris-hld/spaudiopy/blob/add74e0d05cebd83073b121d3a9aad2688506b7c/spaudiopy/grids.py#L114
I was facing the same problem. Also the API seems to change quite frequently...
Eventually I gave up on chasing them (couldn't fix to a specific old version for other reasons.).
If this is interesting, I compiled a mat file of Lebedev grids that then gets loaded and returns the correct grid. Actually, quadpy is not doing anything else last time I checked, just returning hard coded values.
Feel free to copy: https://github.com/chris-hld/spaudiopy/blob/add74e0d05cebd83073b121d3a9aad2688506b7c/spaudiopy/grids.py#L114
Yeah, thanks for the hint and offer! How should we do this?
I personally like the development effort on quadpy, since it collects a lot of spatial sampling strategies for different geometries and the API evolves to a consistent handling at the moment. In long term we might not only focusing on spherical geometry and we might want to use such a package.
On the other hand, a middle term solution is to copy the code from grid.pyas suggested by chris-hld.
Or using the (really bad) coding starting this PR as a hot fix short term solution.
Any preferences here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use the quadpy package for creating Lebedev spherical grids. quadpy API changed a lot meanwhile, so I tried to fixed this issue with this PR. The fix is not the nicest, since the current quadpy API handling with
quadpy.u3.get_good_scheme(degree)does not fully cover all available Lebedev grids. Thus, I decided to use more lower level features calling lebedev_xxx() function directly, these functions should last longer as the upper part of the API. The API also changed the coordinate handling, it now returns cartesian coordinates. So our function must convert to az, colat, r. That's why I also copied the sph2cart and cart2sph routines from sfs toolbox into the util.pyWhat do you think? Thanks for suggestions and help.