Metadata-Version: 2.4
Name: astrokit
Version: 0.1.0
Summary: AstroKit: A Python ToolKit for Astronomy
Project-URL: Homepage, https://github.com/astro-zhurui/astrokit
Project-URL: Bug Tracker, https://github.com/astro-zhurui/astrokit/issues
Author-email: Rui Zhu <zhurui675@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Rui Zhu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# AstroKit

[![PyPI version](https://badge.fury.io/py/astrokit.svg?icon=si%3Apython)](https://badge.fury.io/py/astrokit)
[![PyPI Downloads](https://static.pepy.tech/badge/astrokit)](https://pepy.tech/projects/astrokit)
[![Documentation Status](https://readthedocs.org/projects/astrokit/badge/?version=latest)](https://astrokit.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15321580.svg)](https://doi.org/10.5281/zenodo.15321580)


![logo](./logo/AstroKit.webp)

🌟 Current Version (BETA): **0.1.0**

⚠️ **AstroKit is currently under development.**<br>
Please use it with caution.
Feedback and suggestions are very welcome — feel free to contact me at zhurui675@gmail.com.
The first stable release (version 1.0.0) will be available soon (expected in late 2025).


## 🏁 Quick Start
**AstroKit** is a Python package for astronomical data analysis (hodgepodge 😁), developed by [Rui Zhu](https://github.com/astro-zhurui). 
It provides:

1. **Photometric data preprocessing** — including photometric redshift estimation, extinction correction, and more.  
2. **Wrappers for classical astronomical software** — such as **GALFIT(M)**, **STILTS**, **EAZY**, and **SExtractor**.  
3. **A collection of useful functions** developed for and inspired by my own research.
4. More features and documents are on the way!


✨ To install:<br>
- step 1: **pip install**
```bash
pip install astrokit
```
- step 2: **write your own config file**<br>
create a new file named `.astrokit_config.yaml` in your home directory. Here is an example (also in the `.astrokit_config_template.yaml` file):
```yaml
# software directory
PATH_SEX:  # SExtractor program file directory
  /opt/homebrew/Cellar/sextractor/2.28.0/share/sextractor
PATH_EAZY:  # EAZY program file directory
  /Users/rui/Applications/eazy-photoz

# Qucik Directory
PATH_DOWNLOAD:  # Default save file path
  /Users/rui/Downloads

# Project Tools Directory
PATH_PROJECT_TOOL:
  - <PATH_PROJECT1>
  - <PATH_PROJECT2>

# My Account and Password
Account_HSC: 
  username: <xxx>
  password: <xxx>
```

- step 3: **Enjoy it!**<br>
```python
import astrokit as ak
```

🔔 Tip: Because a lot of dependencies are required, it is recommended to use [Miniconda](https://docs.conda.io/en/latest/miniconda.html) to create a new environment and install AstroKit in it. All required packages are listed in the `requirement.txt` file.

```bash
# Create a new conda environment
conda create -n astro python=3.13
# Activate the environment
conda activate astro
# Install Required packages
pip install -r requirements.txt
# Install AstroKit
pip install astrokit
```


## 📖 Documentation
Read the full documentation at [astrokit.readthedocs.io](https://astrokit.readthedocs.io/en/latest/).
The documentation is still under construction, and the API may change in the future.


## 📜 License
This project is licensed under the terms of the MIT license.
See the [LICENSE](LICENSE) file for details.


## 📚 Citation
(Zenodo Software DOI)
```bibtex
@software{zhu_2025_15321580,
  author       = {Zhu, Rui},
  title        = {AstroKit: A Python Package for Astronomical Data
                   Analysis
                  },
  month        = may,
  year         = 2025,
  publisher    = {Zenodo},
  version      = {beta-0.0},
  doi          = {10.5281/zenodo.15321580},
  url          = {https://doi.org/10.5281/zenodo.15321580},
  swhid        = {swh:1:dir:db15360761629c93ac723f4566e63570dfbe1d75
                   ;origin=https://doi.org/10.5281/zenodo.15321579;vi
                   sit=swh:1:snp:d83768d3d6f61e42e4028e488e6212d39d77
                   0eea;anchor=swh:1:rel:54bf5502e35b15d3f73552ebb3bc
                   00e154356c18;path=/
                  },
}
```

## 🤝 Acknowledgements
This project makes use of code and Data from the following projects:

### Data Cite
(astrokit.datasets.data)
- eazy_filters: Copied from the [EAZY Code](https://github.com/gbrammer/eazy-photoz/tree/master/filters)
- templates: 
    1. [lephare](http://www.cfht.hawaii.edu/~arnouts/LEPHARE/DOWNLOAD/lephare_dev_v2.2.tar.gz)
    2. [sdss](https://classic.sdss.org/dr5/algorithms/spectemplates/)


### Code Cite 
(astrokit.externals)
- HSC_pdr3/: Copied from [hsc-gitlab](https://hsc-gitlab.mtk.nao.ac.jp/ssp-software/data-access-tools/-/tree/master/pdr3)
- sfdmap.py
    Copied from [sfdmap2](https://github.com/AmpelAstro/sfdmap2/tree/main/sfdmap2)

(astrokit.ML)
- d2l.py: Modified from https://github.com/d2l-ai