-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implementation of Bessel support in pyEXP [WIP] #75
Conversation
… added a HighFive template specification for the new API [no ci]
…eld-ordering convention) [no ci]
- Create version string variable for all HighFive-generated HDF5 caches - This will effectively expire all existing caches - Emit a message that the cache is rebuiling for an API change
…at I already fixed?)
…oose inner and outer bin edges to prevent empty bins at small and large radii [no ci]
…nalize calls [no ci]
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.
Two quick things to understand the changes.
src/Sphere.cc
Outdated
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.
What is the typical usage of noff
?
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.
The previous implementation used the minimum and maximum particle radii to set the inner and outer bin radius, respectively. This is a bit risky because a extreme tail value could dominate the binning (esp. if logarithmic). I immediately ran into trouble when I tried it on SIDM problem. So I changed that to pick the noff
point in the ordered list from each end. Or 1/2 the mean number of particles per bin if that is larger. That latter bit might be too conservative. I'm inclined to drop that last bit and set from noff`` exclusively. Then one could recover the original behavior with
noff=0`. Not that the original behavior is desired.
No one, including me, is really using the recomputation strategy, so I consider it to be experimental.
exputil/realize_model.cc
Outdated
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.
Tough one to catch. Do we a) think this is the only instance, and b) how far back does this go?
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.
Looks like it goes back to the Eigen port from the Summer/Fall of 2021. I suppose it is possible that we didn't try multimass runs since. The error only is in the multimass implementation. If N were a multiple of numprocs, or if the tail of the distribution had very low probability, it still would have worked. But there's no reason to expect that to occur.
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.
So to answer your question specifically, I checked that the single-mass particle selection functions do not have this issue. And they have been used multiple times recently without issue. That doesn't mean that there isn't some other fence-post issue in there somewhere.
… mistake in default value for Coef::EvenOddPower() [no ci]
…kward compatibility with the old (buggy) HighFive Eigen wrappers
This last commit implements versioning for
|
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.
Some suggestions on backwards compatibility changes.
Co-authored-by: Michael Petersen <[email protected]>
Co-authored-by: Michael Petersen <[email protected]>
Co-authored-by: Michael Petersen <[email protected]>
Co-authored-by: Michael Petersen <[email protected]>
|
I've been using this as my local branch and haven't detected any changes. Merging back now. |
Major changes
Spherical
, inheriting fromBasisClass
SphericalSL
andBessel
now derive fromSpherical
Spherical
contains most of the meat of the implementation. The derived classes supply the biorthogonal functions.SphericalSL
;Bessel
has no cache.BasisWrappers
to produce the newbessel
type basis in the Python interfaceTests so far
SphericalSL
(a.k.a. thesphereSL
type) produced the same resultsbessel
type basis and rendered surface and line fields.getBasis
returned the basis functions and that they look sensible.