com1DFA.particleTools.getClosestNeighbour

getClosestNeighbour(xPartArray, yPartArray, zPartArray, ind, sphKernelRadius, keepParticle)[source]

find closest neighbour

Parameters
  • xPartArray (numpy array) – x position of the particles

  • yPartArray (numpy array) – y position of the particles

  • zPartArray (numpy array) – z position of the particles

  • ind (int) – index of particle modified

  • sphKernelRadius (float) – kernel radius

  • keepParticle (numpy array) – boolean array telling if particles are kept or merged

Returns

  • rMerge (float) – distance to the closest neighbour

  • neighbourInd (int) – index of closest neighbour