cTreeBalls

cTreeBalls measures two- and three-point correlation functions from point catalogs and scalar fields using tree- and ball-based search methods. The project provides:

  • the compiled C command-line executable cballs;

  • the static library libcballs.a;

  • the Cython extension cyballs;

  • test catalogs, plotting scripts, and benchmark workflows.

The guide is organized like the companion 3ptWL projects: begin with the overview, installation, and quickstart; use the task-oriented pages for real runs; then consult the tutorials and developer reference.

Basic Usage

Build from a source checkout:

git clone https://github.com/rodriguezmeza/cTreeBalls.git
cd cTreeBalls
make clean
make PYTHON=python3 all

Run a compact synthetic-catalog calculation:

./cballs nbody=4096 sizeHistN=12 mChebyshev=3 \
   rootDir=Output_quick numberThreads=1 verbose=0 verbose_log=0

Or call the same C core through Python:

from cyballs import cballs

model = cballs()
model.set({
    "nbody": 4096,
    "sizeHistN": 12,
    "mChebyshev": 3,
    "rootDir": "Output_python",
    "numberThreads": 1,
    "verbose": 0,
    "verbose_log": 0,
})
model.Run()
radius = model.getrBins()
xi = model.getHistXi2pcf()
model.clean_all()

How to Use This Guide

Read Installation and Quickstart first. For production runs, consult Command-Line Usage, Inputs and Catalog Formats, Outputs and File Formats, and Performance and Parallelization. Existing detailed material on parameters, formats, pre/post-processing, 2PCF, 3PCF, and add-ons remains available under Tutorials and Reference.