Metadata-Version: 2.1
Name: blending-toolkit
Version: 1.0.0a3
Summary: Blending ToolKit
Home-page: https://github.com/LSSTDESC/BlendingToolKit
License: MIT
Keywords: cosmology,galaxies,blending,lsst,simulation
Author: Ismael Mendoza
Author-email: imendoza@umich.edu
Requires-Python: >=3.7.1,<3.10.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: astropy (>=4.3.1,<5.0.0); python_full_version >= "3.7.1" and python_full_version < "3.8.0"
Requires-Dist: astropy (>=5.1); python_version >= "3.8"
Requires-Dist: galcheat (>=1.0.0)
Requires-Dist: galsim (>=2.3.5)
Requires-Dist: ipywidgets (>=7.6.5)
Requires-Dist: matplotlib (>=3.5.1)
Requires-Dist: nbmake (>=1.3.4,<2.0.0)
Requires-Dist: numpy (>=1.16.5,<1.22.0); python_full_version >= "3.7.1" and python_full_version < "3.8.0"
Requires-Dist: numpy (>=1.22); python_version >= "3.8"
Requires-Dist: pandas (>=1.3.5,<1.4.0); python_full_version >= "3.7.1" and python_full_version < "3.8.0"
Requires-Dist: pandas (>=1.4.2); python_version >= "3.8"
Requires-Dist: scikit-image (>=0.19.2)
Requires-Dist: scipy (>=1.7.3,<1.8.0); python_full_version >= "3.7.1" and python_full_version < "3.8.0"
Requires-Dist: scipy (>=1.8.1); python_version >= "3.8"
Requires-Dist: seaborn (>=0.11.2)
Requires-Dist: sep (>=1.2.0)
Requires-Dist: tqdm (>=4.64.0)
Project-URL: Bug Tracker, https://github.com/LSSTDESC/BlendingToolKit/issues
Project-URL: Documentation, https://lsstdesc.org/BlendingToolKit/index.html
Project-URL: Repository, https://github.com/LSSTDESC/BlendingToolKit
Description-Content-Type: text/markdown

# BlendingToolKit

![tests](https://github.com/LSSTDESC/BlendingToolKit/workflows/tests/badge.svg)
![tests](https://github.com/LSSTDESC/BlendingToolKit/workflows/docs/badge.svg)
[![notebooks](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml)
[![codecov](https://codecov.io/gh/LSSTDESC/BlendingToolKit/branch/main/graph/badge.svg)](https://codecov.io/gh/LSSTDESC/BlendingToolKit)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![PyPI][pypi-badge]][pypi]

[pypi-badge]: <https://img.shields.io/pypi/pyversions/blending-toolkit?color=yellow&logo=pypi>
[pypi]: <https://pypi.org/project/blending-toolkit/>

## Summary

Framework for fast generation and analysis of galaxy blends catalogs. This toolkit is a convenient way of
producing multi-band postage stamp images of blend scenes.

Documentation can be found at <https://lsstdesc.org/BlendingToolKit/index.html>

## Workflow

<img src="docs/source/images/diagram.png" alt="btk workflow" width="550"/>

- In red are the BTK objects that can be customized in various ways by BTK users.

## Running BlendingToolKit

- BlendingToolKit (btk) requires an input catalog that contains information required to simulate galaxies and blends.
This repository includes sample input catalogs with a small number of galaxies that can be used to draw blend images with btk. See [tutorials](https://github.com/LSSTDESC/BlendingToolKit/tree/main/notebooks) to learn how to run btk with these catalogs.
- CatSim Catalog corresponding to one square degree of sky and processed WeakLensingDeblending catalogs can be downloaded from [here](https://stanford.app.box.com/s/s1nzjlinejpqandudjyykjejyxtgylbk).
- [Cosmo DC2](https://arxiv.org/abs/1907.06530) catalog requires pre-processing in order to be used as input catalog to btk. Refer to this [notebook](https://github.com/LSSTDESC/WeakLensingDeblending/blob/cosmoDC2_ingestion/notebooks/wld_ingestion_cosmoDC2.ipynb) on how to convert the DC2 catalog into a CatSim-like catalog that can be analyzed with btk.

## Installation

BTK is pip installable, with the following command:

```bash
pip install blending_toolkit
```

Although you might run into problems installing `galsim`. In case of any issues, please see the more detailed installation instructions [here](https://lsstdesc.org/BlendingToolKit/install.html).

For required packages, see [pyproject.toml](https://github.com/LSSTDESC/BlendingToolKit/blob/main/pyproject.toml) under the `[tool.poetry.dependencies]` block. For developers, you will also need the packages under the `[tool.poetry.dev-dependencies]` block.

## Contributing

See [CONTRIBUTING.md](https://github.com/LSSTDESC/BlendingToolKit/blob/main/CONTRIBUTING.md)

