PHANTOM: A MATLAB and Octave Toolbox Connecting Linear Field Statistics to Dark Matter Halo Observables
Abstract
We present phantom (Profile and Halo Analysis for Numerous Theoretical dark Matter Observables), a public MATLAB toolbox and Octave package for calculations that connect the linear density field to dark matter halo observables. The package combines a flexible cosmology module with linear power spectrum, variance, and correlation function solvers, and a halo module that covers mass functions, linear bias, density profiles, and concentration-mass relations for cold, warm, and fuzzy dark matter scenarios. All core routines are validated against the Python package colossus, hmf, and halomod, yielding sub-percent agreement for shared models across distances, power spectra, variance, correlation functions, halo mass functions, and density profiles. Phantom is organised around a cosmology structure that stores background expansion, growth, and linear power-spectrum handles; this object is constructed once and passed through the call graph, so that halo statistics and halo structure calculations remain consistent by design. From this single entry point, users can obtain field statistics (power spectrum, variance, correlation function), halo statistics (mass functions, linear bias), and halo observables (enclosed mass, circular velocity, projected density, and lensing convergence) on arbitrary user-defined grids. The toolbox targets users whose analysis pipelines are written in MATLAB or Octave, where a validated native implementation of these models has been absent. The code is released under the MIT licence at phantom(https://github.com/matc-thaher/PHANTOM).
Related
- GIMLI: a toolkit connecting linear and non-linear magnetohydrodynamic regimes
- Quantifying and testing the evidence for a phantom crossing
- Connecting the little dots in polarized light
- Addressing the DESI DR2 phantom-crossing anomaly and enhanced H 0 tension with reconstructed scalar-tensor gravity
- Connecting Dynamo Theory with DNS Data: A Computational Analysis of α and β effects
BibTeX
@misc{chowdhury2026phantom,
title = {{PHANTOM: A MATLAB and Octave Toolbox Connecting Linear Field Statistics to Dark Matter Halo Observables}},
author = {Mohammad Abu Thaher Chowdhury},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2606.19104},
eprint = {2606.19104},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2606.19104},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - PHANTOM: A MATLAB and Octave Toolbox Connecting Linear Field Statistics to Dark Matter Halo Observables
AU - Mohammad Abu Thaher Chowdhury
PY - 2026
DA - 2026/10/06
PB - arXiv
DO - 10.48550/arxiv.2606.19104
UR - https://arxiv.org/abs/2606.19104
AB - We present phantom (Profile and Halo Analysis for Numerous Theoretical dark Matter Observables), a public MATLAB toolbox and Octave package for calculations that connect the linear density field to dark matter halo observables. The package combines a flexible cosmology module with linear power spectrum, variance, and correlation function solvers, and a halo module that covers mass functions, linear bias, density profiles, and concentration-mass relations for cold, warm, and fuzzy dark matter scenarios. All core routines are validated against the Python package colossus, hmf, and halomod, yielding sub-percent agreement for shared models across distances, power spectra, variance, correlation functions, halo mass functions, and density profiles. Phantom is organised around a cosmology structure that stores background expansion, growth, and linear power-spectrum handles; this object is constructed once and passed through the call graph, so that halo statistics and halo structure calculations remain consistent by design. From this single entry point, users can obtain field statistics (power spectrum, variance, correlation function), halo statistics (mass functions, linear bias), and halo observables (enclosed mass, circular velocity, projected density, and lensing convergence) on arbitrary user-defined grids. The toolbox targets users whose analysis pipelines are written in MATLAB or Octave, where a validated native implementation of these models has been absent. The code is released under the MIT licence at phantom(https://github.com/matc-thaher/PHANTOM).
ER -