EXP interface enhancements
Once #413 is in, and exp-code/exp#136 is addressed, we should:
- [x] Use getAccel() to compute the acceleration instead of getFields (to save on computation)
- [x] Improve C++ exception handling (e.g., evaluating interpolator at a time outside of range)
- [ ] Improve speed and benchmark against pyEXP orbit integration
- [ ] Hessian
- [ ] Pickling, saving, and loading an
EXPPotentialinstance
cc @lgarrison
As discussed today, we'll try to rebuild the EXP interface to use PyEXP objects. We will probably extract the EXP objects/pointers at the Python level and pass those to the Gala-EXP extension. The extension will thus depend on EXP but not PyEXP, although PyEXP will be a Python dependency.
For the existing API of passing filename strings, we can make PyEXP objects under the hood and use those.
From @the9cat:
A quick follow up on getAccel(). I did put a getAccelArray() in the interface which takes arrays (x, y, z) and returns accel value as rows of a matrix. I think you want this to be a pure overload? So both named versions named getAccelArray? That's easy to do; just a binding change. FYI, my implementation of getAccelArray is a naive loop over getArray on the C++ side. This could be optimized.
I've overloaded getAccel() in the C++ inteface in EXP-code/EXP#170 so that both versions should bind and changed the pyEXP interface accordingly. This is probably the better choice? Not sure. Good for me either way.