Overview#

AnaCal (Analytic Calibration) is a Python/C++ library for accurate measurement of perturbations on galaxy images. It provides analytic shear estimators capable of inferring shear with sub-percent accuracy while maintaining minimal computational cost.

Features#

  • FPFS shear estimator — measures shapelet and detection modes in Fourier space, with analytic noise-bias correction.

  • Flexible PSF handling — supports both array-based and spatially varying PSF models via the BasePsf interface.

  • High-performance C++ core — critical inner loops (shapelet convolution, source detection, deconvolution) are implemented in C++ and exposed through pybind11.

  • Simulation utilities — generate isolated and blended COSMOS-like galaxy images for shear calibration studies.

Dependencies#

Installation#

Stable release#

pip install anacal

From source#

git clone https://github.com/mr-superonion/AnaCal.git
cd AnaCal
pip install .

Development install#

git clone https://github.com/mr-superonion/AnaCal.git
cd AnaCal
pip install -e ".[dev]"

Development#

Before sending a pull request, please make sure that the modified code passes the pytest and flake8 tests:

flake8
pytest -vv