What's Changed
Significant enhancements to the KDTree (#769):
- pynbody's sphere filters now make use of the KDTree to greatly enhance extracting spheres from large simulations.
- KDTrees will not automatically be built, so you should call
f.build_tree()
beforef[pynbody.filt.Sphere(...)]
to obtain the speed-up. Building the tree takes a while, so this is only worth doing if a large number of spheres will be extracted. - KDTrees are now built in parallel, significantly speeding up operations that need them (such as SPH smoothing)
- KDTree data is now stored in numpy arrays, so it can be inspected from python and also can be stored in shared memory
Full Changelog: v1.5.2...v1.6.0