FEMMI reconstructs weak-lensing convergence from shear catalogues using finite and boundary elements. It fits the observations at their source positions and supports cubic Lagrange (P3), Argyris, and Hsieh–Clough–Tocher (HCT) elements. The survey interface reads FITS tables and writes convergence images, source residuals, coverage, and optional randomized-catalogue noise maps.
The model assumes linear shear on a flat field at one effective source plane. Regularization supplies information where observations are insufficient; a reconstructed value inside a mask is a prediction under that prior.
Use Python 3.10 or later in a virtual environment:
git clone https://github.com/AdamField118/FEMMI.git
cd FEMMI
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[io,speed]'
python examples/quickstart.pyNumba accelerates CPU boundary assembly. The package retains a NumPy backend and uses SciPy for sparse solves. No GPU is required.
Copy and edit configs/survey.yaml to set the column names, shear convention,
angular scale, and prior for your data, then run:
femmi map --config configs/survey.yaml --catalogue shapes.fits --output-dir results/clusterIn Python, femmi.map_mass provides the same survey workflow. Use FEMMapper
when working directly with arrays or reusing a mesh for several shear catalogues.
Start with installation, the runnable quickstart, and the FITS guide. The API reference describes arguments, return values, and errors. The mathematical model defines the operator and its limitations.
python -m pip install -e '.[docs]'
mkdocs serveFor experiments, see the benchmark protocol and
profiling guide. Keep recipes in Git and
write generated data to results/. Archive results separately with the exact
configuration and source revision when publishing a comparison.
Report bugs or ask usage questions in GitHub Issues. Include a small reproducer, your configuration, dependency versions, and the traceback. See CONTRIBUTING.md for development and testing instructions. FEMMI is distributed under the MIT license. When citing unreleased work, identify the repository and the exact commit used.