Metadata-Version: 2.4
Name: specless-astro
Version: 0.2.1
Summary: SpecLess: photometry-based machine learning tools for galaxy classification
Author: Uzay Aydın
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/uzayyaydiin/SpecLess
Project-URL: Repository, https://github.com/uzayyaydiin/SpecLess
Project-URL: Issues, https://github.com/uzayyaydiin/SpecLess/issues
Keywords: astronomy,astrophysics,galaxies,galaxy-classification,photometry,machine-learning,sdss,wise,kids,xgboost
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.0
Requires-Dist: scikit-learn>=1.4
Requires-Dist: xgboost<4,>=3.1
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/uzayyaydiin/SpecLess/main/docs/assets/specless-logo.png" width="420" alt="SpecLess logo">
</p>

# SpecLess

**SpecLess** is an open-source Python framework for photometry-based machine-learning classification of galaxies.

The project is designed to provide reusable pretrained models, photometric feature-engineering tools, survey-validation workflows, and a collaborative framework for galaxy classification without requiring spectroscopy at inference time.

## Current status

SpecLess is currently under active development.

### Model 1: Galaxy Morphology

Binary classification:

- Elliptical
- Spiral

Primary classifier:

- XGBoost

Required photometric bands:

- SDSS `u`, `g`, `r`, `i`, `z`
- WISE `W1`, `W2`

SpecLess automatically constructs the 21 colour features used by the pretrained classifier, producing a total of 28 photometric features.

The current Model 1 classifier was trained on 142,212 galaxies and evaluated on an independent test sample of 35,554 galaxies.

## Development installation

Clone the repository and install in editable mode:

```bash
pip install -e .
import pandas as pd
from specless_astro import MorphologyClassifier

catalog = pd.read_csv("catalog.csv")

model = MorphologyClassifier()

result = model.predict(catalog)

print(
    result[
        [
            "specless_label",
            "p_elliptical",
            "p_spiral",
            "confidence",
        ]
    ]
)
