Documentation | Quick Start | Examples
This project is currently under active development!!!
BrahMap is a scalable and modular map-making framework for CMB experiments.
It features a user-friendly Python interface for the linear operators used in
map-making. The Python interface seamlessly handles the workflow while
delegating the heavy computations to highly optimized C++ extensions. In
addition to the core linear operators, BrahMap offers a wrapper for
Generalized Least Squares (GLS) map-making using a Preconditioned Conjugate
Gradient (PCG) solver. BrahMap is also fully integrated with litebird_sim
through dedicated wrappers.
For a quick introduction to map-making with BrahMap, refer to the
quick start guide.
For a complete reference to the BrahMap API, refer to the
API reference.
Complete example notebooks and scripts can be
found here.
You can find detailed information on the implementation and features of
BrahMap at arXiv:2501.16122.
The versions of the dependencies for BrahMap are quite flexible. If you
intend to use BrahMap alongside other packages (like litebird_sim), we
recommend installing BrahMap after you have installed those packages in the
same environment.
BrahMap requires an MPI library to compile the C++ extensions. By default,
it uses the mpicxx compiler wrapper for this task. However, you can override
this default by setting the MPICXX environment variable to your preferred
compiler. To install BrahMap, please follow these steps:
# Clone the repository
git clone https://github.com/anand-avinash/BrahMap.git
# Enter the directory
cd BrahMap
# Set the compiler you want to use (optional)
export MPICXX=mpiicpc
# Install the package
pip install .
# Alternatively, do an editable installation for development purpose
# followed by `pre-commit` install
pip install -e .
pre-commit installNote
BrahMap uses Setuptools
to build the C++ extensions. By default, it generates the compilation command
by gathering various environment variables. You can customize the compilation
flags used during the installation by setting the CXXFLAGS, CPPFLAGS,
and LDFLAGS environment variables.
BrahMap includes a comprehensive benchmarking suite to evaluate the performance
of its numerical routines and linear operators. The benchmarks are based on
pytest-benchmark and support both serial and MPI-parallel execution.
For detailed instructions on how to run and customize the benchmarks, refer to the benchmarks documentation.
This work can be cited with:
@misc{anand2025brahmap,
title={\texttt{BrahMap}: A scalable and modular map-making framework for the CMB experiments},
author={Avinash Anand and Giuseppe Puglisi},
year={2025},
eprint={2501.16122},
archivePrefix={arXiv},
primaryClass={astro-ph.CO},
url={https://arxiv.org/abs/2501.16122},
}
This work is supported by Italian Research Center on High Performance Computing, Big Data and Quantum Computing (ICSC), project funded by European Union - NextGenerationEU - and National Recovery and Resilience Plan (NRRP) - Mission 4 Component 2 within the activities of Spoke 3 (Astrophysics and Cosmos Observations).