Search arXivSearch

arXiv · 2609.18316

cosmokdtree: a flexible OpenMP-parallelized k-d tree for computational astrophysics applications

Abstract

Modern numerical astrophysics applications present a common demand for efficient spatial querying techniques, such as neighbor searches or density estimations over billions of resolution elements. To address the growing need for fast and versatile tools tailored to these tasks, we present cosmokdtree, a fast and flexible multi-purpose k-d tree implementation in Fortran, parallelized with OpenMP directives. Our library supports arbitrary dimensionality and spatial distributions, and is designed for efficient tree construction and fast query performance for moderate-scale applications (performance tested up to 10^9 points). Python bindings coupled to the module are also provided. All these ingredients yield a k-d tree package suitable for analysis purposes. We benchmark cosmokdtree across a variety of scenarios, including different point distributions, dimensionality, and parallel scaling. We also compare its performance against the widely used scipy implementation and other efficient alternatives such as coretran's and a GPU-based version, showing that cosmokdtree consistently achieves lower construction and query times than CPU alternatives while keeping a reasonable memory usage. Our tree-building phase implementation, executed on a mid-range workstation-class CPU, approaches the performance of GPU-based implementations when run on high-end consumer graphic cards, although data-center GPUs, out of the scope for our comparison, could still deliver substantially higher performance and a broader conclusion cannot be extracted. We further present some applications tackling common problems in astrophysics, namely, the friends-of-friends clustering algorithm and the particle-to-mesh assignment process. The code is publicly released and intended to serve as a flexible multi-purpose tool for computational applications in a wide range of scenarios, particularly in astrophysics.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Óscar Monllor-Berbegal, David Vallés-Pérez, Susana Planelles, Vicent Quilis. 2026-09-16. cosmokdtree: a flexible OpenMP-parallelized k-d tree for computational astrophysics applications. https://doi.org/10.1016/j.ascom.2026.101175

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Performance characterization of a new Structural and Thermal Architecture for a future spaceborne Closed-Cycle Dilution Refrigerator

A Structural and Thermal Model (STM) has been developed to support the new spaceborne Closed-Cycle Dilution Refrigerator (CCDR), which aims to provide continuous cooling at 100~mK for long-duration astrophysical missions. The STM is based on a hexapod architecture that ensures both thermal decoupling and mechanical robustness during launch. In this paper, we present the characterization of its thermal and mechanical performances. A dedicated experimental setup was used to investigate the thermal behavior of the STM across a broad temperature range. The study reveals limitations of the collar design, with incomplete power interception from thermal boundary resistances and vibration test failure traced to defective strut gluing. These results guide the next STM iteration with optimized collar and strut assembly for reliable CCDR operation in space.

astro-ph.IM

The Simons Observatory: Development of a Pipeline to Detect Rapid Transients in Time-Ordered Data

We introduce a method for detecting astrophysical transients evolving on timescales of milliseconds to minutes using cosmic microwave background (CMB) survey telescopes. While previous transient searches in CMB data operate in map space, our pipeline directly processes the raw time-ordered data, enabling sensitivity to fast, dynamic signals. We integrate our detection approach into the Simons Observatory time-domain pipeline and assess the performance by injecting symmetric, stellar flare-like light curves into simulated observations. For events flaring with a timescale of 0.5 s, the pipeline detects $\gtrsim90$ % of events at flux densities of 800, 1150, 1650, and 4250\,mJy when measured in the 93, 145, 225, and 280 GHz bands respectively. At a fixed peak flux density, the pipeline more readily detects longer flares. The limiting flux density for 90 % completeness is four times lower for a $\ge5$ s flare than for a 0.5 s flare, while the flux density limits for $\gtrsim50$ % detection efficiency are comparable to the rms noise of the time-ordered data. We are able to determine the position of detected events in each observing band, with a positional uncertainty at the detection threshold comparable to the telescope resolution at that band. These results demonstrate the readiness of this pipeline for incorporation into upcoming Simons Observatory data analyses.

astro-ph.IM

Thermal conductivity of various CFRPs from 100 mK to 20 K

Carbon-fiber-reinforced polymers (CFRPs) are some of the most useful materials for building spacecraft and aerospace tools. They are especially valuable for systems that work at extremely cold (cryogenic) temperatures because they are strong, lightweight, and don't transfer heat easily. In this study, researchers measured how well heat moves through several different types of carbon fiber samples, specifically T300, T700, HS40, M55J, and IMA, at different fiber layouts and densities. These measurements were taken at ultra-cold temperatures ranging from 100 mK to 20 K. The team used a newly developed analysis method to calculate the thermal conductivity for each sample. Finally, they shared how each material behaved at different temperatures and compared their findings to previous research.

astro-ph.IM