Skip to content

mr-superonion/xlens

Repository files navigation

xlens (Gravitational Lensing from Image Pixels)

tests codecov conda-forge docs

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.

Subpackages

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

Installation

From GitHub

git clone https://github.com/mr-superonion/xlens.git
cd xlens
conda install -c conda-forge --file requirements.txt
pip install .

From conda-forge

conda install -c conda-forge xlens

Input Galaxy Catalog

Download 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)

Examples

Example notebooks are in the examples/ directory:

Shear measurement

Cluster lensing

Random field

Intrinsic alignments

Rendered versions are available in the online documentation.

Documentation

Full API reference and rendered notebooks: https://xlens.readthedocs.io/en/latest/

Development

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

flake8
pytest -vv

License and Acknowledgements

This 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.

About

Gravitational Lensing from Image Pixels

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors