Open kain88-de opened 6 years ago
The reason why this happens is because max_dist
used to build the cellgrid binsize. For two particles in neighboring cells it is possible to have a distance larger then the cell bin size.
Yeah so the max_dist is slightly approximate right now which is wrong. An easy fix would be dists = dists[dists <= max_dist]
right at the end. Or alternatively filter them as you insert.
See https://gist.github.com/kain88-de/247049819f75c0a72b3d61c7967f10ec
The max_dist is set to 10 A.U but there are distances returned with a larger value. The docs state that this shouldn't happen.