<div align="center">
  <img width="1280px" src="https://raw.githubusercontent.com/ChenYangyao/baryon-cycle/master/docs/site-data/cover-github.png" alt="BAGS: Revealing baryon cycle around galaxies with stacking analysis"/>
</div>

[![Last commit](https://img.shields.io/github/last-commit/ChenYangyao/baryon-cycle/master)](https://github.com/ChenYangyao/baryon-cycle/commits/master)
[![Workflow Status](https://img.shields.io/github/actions/workflow/status/ChenYangyao/baryon-cycle/run-test.yml)](https://github.com/ChenYangyao/baryon-cycle/actions/workflows/run-test.yml)
[![MIT License](https://img.shields.io/badge/License-MIT-blue)](https://github.com/ChenYangyao/baryon-cycle/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/baryon-cycle)](https://pypi.org/project/baryon-cycle/)

The package holds the codes and data products for the ***BAGS*** project.

## Publications 

- Chengyu Ma, Yangyao Chen*, Enci Wang* et al. 2025 (the stacking method). arXiv ???; published in ???, 202?, ???, ??.

## Installation

You can clone the repository and install the package locally via `pip install -e /path/to/the/repo`.

Alternatively, if you are only interested in using the python module without the codes and data products, we also prepare a PyPI package that can be installed via pip:
```bash
pip install baryon-cycle
```

## Codes and data products for the papers

- Paper-I: [docs/Paper-I-BAGS-method/](docs/Paper-I-BAGS-method/). Code samples and data for running the code are available. 3D fields and fields for individual galaxies are too large to be stored here, but are available upon request.

## For developers

### Contribute to the project

Pull requests are welcome. For any changes, start a pull request to the ``dev`` branch and we will review it.

## For users

### Citation

We ask the users to cite the paper(s) when using the package (code or data) in their research.

Users using specific module/code sample should also follow the copyright header in the source files.

### Issues

Any issue is welcomed. If you have any question or suggestion, please open an issue on Github and we will provide a reply as soon as we can. You are also welcomed to contact any of the authors of the paper directly through email (see below for the contact information).

## Contacts

- Chengyu Ma (USTC, 3065616846@qq.com)
- Yangyao Chen* (NJU, yangyaochen.astro@foxmail.com)
- Enci Wang* (USTC, ecwang16@ustc.edu.cn)