English

GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search

Instrumentation and Methods for Astrophysics 2020-12-24 v2

Abstract

We present a new regular grid search algorithm for quick fixed-radius nearest-neighbor lookup developed in Python. This module indexes a set of k-dimensional points in a regular grid, with optional periodic conditions, providing a fast approach for nearest neighbors queries. In this first installment we provide three types of queries: bubblebubble, shellshell and the nthnearestnth-nearest; as well as three different metrics of interest in astronomy: the euclideaneuclidean and two distance functions in spherical coordinates of varying precision, haversinehaversine and VincentyVincenty; and the possibility of providing a custom distance function. This package results particularly useful for large datasets where a brute-force search turns impractical.

Keywords

Cite

@article{arxiv.1912.09585,
  title  = {GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search},
  author = {Martin Chalela and Emanuel Sillero and Luis Pereyra and Mario Alejandro García and Juan B. Cabral and Marcelo Lares and Manuel Merchán},
  journal= {arXiv preprint arXiv:1912.09585},
  year   = {2020}
}

Comments

Accepted for publication in Astronomy and Computing on December 16, 2020. 12 pages, 8 figures

R2 v1 2026-06-23T12:51:52.615Z