xlens is a weak gravitational lensing analysis framework built on AnaCal and the LSST Science Pipelines. It provides end-to-end tools for simulating galaxy images, measuring shapes with FPFS shapelets, and correcting for WCS distortions.
| Subpackage | Description |
|---|---|
catalog |
Truth catalog generation with controlled shear signals |
simulator |
Galaxy image simulation with realistic WCS, lensing, PSF, and noise |
processor |
Shear measurement pipelines calibrated with AnaCal (FPFS, NGMIX) |
analysis |
Shear measurement validation and cluster lensing analysis |
wcs |
WCS coordinate conversion and shape correction |
git clone https://github.com/mr-superonion/xlens.git
cd xlens
conda install -c conda-forge --file requirements.txt
pip install .conda install -c conda-forge xlensDownload and set up the DESC DC1 (2017) galaxy catalog:
wget https://github.com/mr-superonion/xlens/releases/download/v0.3.0/catsim-v4.tar.gz
tar xvfz catsim-v4.tar.gz
export CATSIM_DIR=$(realpath catsim-v4)Example notebooks are in the examples/ directory:
Shear measurement
- Isolated galaxy simulation (forced positions)
- Multiband simulation with linear-to-e shear estimation
- Isolated galaxy simulation
- FPFS measurement on blended galaxies (noiseless)
- Blended simulation with matching
- Lognormal field shear test
Cluster lensing
Random field
Intrinsic alignments
Rendered versions are available in the online documentation.
Full API reference and rendered notebooks: https://xlens.readthedocs.io/en/latest/
Before sending a pull request, please make sure the modified code passes the pytest and flake8 tests:
flake8
pytest -vvThis project is distributed under the terms of the GNU General Public License
version 3. Portions of the codebase originate from the Rubin Observatory Legacy
Survey of Space and Time (LSST) Science Pipelines. In accordance with the LSST
license requirements, we acknowledge that this product includes software
developed by the LSST Project (https://www.lsst.org/). Additional copyright
details for bundled LSST-derived software can be found in the accompanying
COPYRIGHT file.