Bayesian calibration and map-making for radio intensity mapping experiments
hydra_tod implements joint Bayesian inference of sky temperature maps,
instrument gains, and correlated noise parameters from radio telescope
time-ordered data (TOD). It uses Gibbs sampling with MPI parallelization
to efficiently handle multi-receiver, multi-scan datasets.
- Flicker noise modeling: 1/f^alpha noise covariance via incomplete gamma functions, with polynomial emulators for fast evaluation
- Gibbs sampler: Joint calibration and map-making alternating between sky, gain, and noise parameter updates
- Multiple gain models: Linear, log-linear, and factorized parameterizations
- MPI parallelization: Distributed iterative linear solvers (conjugate gradient, MINRES) for large-scale problems
- Flexible noise sampling: MCMC (emcee) and NUTS (NumPyro) samplers for non-Gaussian noise posteriors
- Telescope simulation: Realistic MeerKAT scan simulations with sky models (GSM + point sources)
- Diagnostics: MCMC convergence diagnostics (ESS, R-hat), posterior visualization, sky map reconstruction
The package models radio telescope observations as:
TOD = Tsys * (1 + n) * g
where:
- Tsys = Tsky + Tloc is the system temperature (sky + local components)
- n ~ 1/f^alpha is correlated flicker noise
- g is the time-varying instrument gain
# Basic installation
pip install hydra-tod
# With MPI support
pip install hydra-tod[mpi]
# With all optional dependencies
pip install hydra-tod[all]
# Development installation
git clone https://github.com/zzhang0123/flicker.git
cd flicker
pip install -e ".[dev]"from hydra_tod.simulation import TODSimulation
# Create a simulated observation
sim = TODSimulation(
nside=64,
elevation=41.5,
freq=750,
alpha=2.0,
ptsrc_path="gleam_nside512_K_allsky_408MHz.npy",
)
# Access simulated data
print(f"TOD shape: {sim.TOD_setting.shape}")
print(f"Sky pixels: {len(sim.pixel_indices)}")If you use hydra_tod in your research, please cite:
@article{zhang2026joint,
title={Joint Bayesian calibration and map-making for intensity mapping experiments},
author={Zhang, Zheng and Bull, Philip and Santos, Mario G and Nasirudin, Ainulnabilah},
journal={RAS Techniques and Instruments},
pages={rzag024},
year={2026},
publisher={Oxford University Press}
}Full documentation is available at hydra-tod.readthedocs.io.
This project is licensed under the MIT License - see the LICENSE file for details.