Metadata-Version: 2.1
Name: space-classy
Version: 0.4.1
Summary: classification tool for minor bodies using reflectance spectra and visual albedos
Home-page: https://github.com/maxmahlke/classy
License: MIT
Author: Max Mahlke
Author-email: max.mahlke@oca.eu
Requires-Python: >=3.8,<3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Provides-Extra: docs
Requires-Dist: click (>=8.1.2,<9.0.0)
Requires-Dist: furo (>=2022.9.15,<2023.0.0)
Requires-Dist: importlib-resources (>=5.10.2,<6.0.0)
Requires-Dist: jinja2 (<3.1)
Requires-Dist: mcfa (>=0.1,<0.2)
Requires-Dist: numpy (>=1.22.3,<2.0.0)
Requires-Dist: pandas (>=1.4.2,<2.0.0)
Requires-Dist: rich (>=12.2.0,<13.0.0)
Requires-Dist: scikit-learn (>=1.2.1,<2.0.0)
Requires-Dist: space-rocks (>=1.7.2,<2.0.0)
Requires-Dist: sphinx (>=4,<5) ; extra == "docs"
Requires-Dist: sphinx-copybutton (>=0.5.0,<0.6.0)
Requires-Dist: sphinx-hoverxref
Requires-Dist: sphinx-redactor-theme (>=0.0.1,<0.0.2) ; extra == "docs"
Requires-Dist: sphinx_design (>=0.3.0,<0.4.0)
Requires-Dist: tox (>=4.4.5,<5.0.0)
Project-URL: Documentation, https://classy.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/maxmahlke/classy.git
Description-Content-Type: text/markdown

<p align="center">
  <img width="260" src="https://raw.githubusercontent.com/maxmahlke/classy/master/docs/_static/logo_classy.svg">
</p>

<p align="center">
  <a href="https://github.com/maxmahlke/classy#features"> Features </a> - <a href="https://github.com/maxmahlke/classy#install"> Install </a> - <a href="https://github.com/maxmahlke/classy#documentation"> Documentation </a>
</p>

<br>

<div align="center">
  <a href="https://img.shields.io/pypi/pyversions/space-classy">
    <img src="https://img.shields.io/pypi/pyversions/space-classy"/>
  </a>
  <a href="https://img.shields.io/pypi/v/space-classy">
    <img src="https://img.shields.io/pypi/v/space-classy"/>
  </a>
  <a href="https://readthedocs.org/projects/classy/badge/?version=latest">
    <img src="https://readthedocs.org/projects/classy/badge/?version=latest"/>
  </a>
  <a href="https://arxiv.org/abs/2203.11229">
    <img src="https://img.shields.io/badge/arXiv-2203.11229-f9f107.svg"/>
  </a>
</div>

<br>

![Classification of (1) Ceres using data from Gaia/SMASS/MITHNEOS](https://classy.readthedocs.io/en/latest/_images/ceres_classification_dark.png)

# Features

- Classify asteroid reflectance spectra in the taxonomic scheme by [Mahlke, Carry, and Mattei 2022](https://arxiv.org/abs/2203.11229).

- Add spectra from public repositories for comparison

- Explore data via the command line, build an analysis with the ``python`` interface

- Simple syntax: specify the asteroid to analyse, ``classy`` takes care of the rest

``` sh

$ classy spectra juno --classify

```

or

``` python
>>> import classy
>>> spectra = classy.Spectra(3)
... [classy] Found 1 spectrum in Gaia
... [classy] Found 5 spectra in SMASS
>>> spectra.classify()
... [classy] [(3) Juno] - [Gaia]: S
... [classy] [(3) Juno] - [spex/sp96]: S
... [classy] [(3) Juno] - [smass/smassir]: S
... [classy] [(3) Juno] - [smass/smass1]: S
... [classy] [(3) Juno] - [smass/smass2]: S
... [classy] [(3) Juno] - [smass/smass2]: S
>>> spectra.to_csv('class_juno.csv')
```

# Install

`classy` is available on the [python package index](https://pypi.org) as *space-classy*:

``` sh
$ pip install space-classy
```

# Documentation

Check out the documentation at [classy.readthedocs.io](https://classy.readthedocs.io/en/latest/).
or run

     $ classy docs

# Data

The following data files are provided in this repository (format `csv` and `txt`) and at the CDS (format `txt`):

| File `csv` | File `txt` |  Content | Description|
|-----------|--------|----|------------|
| `class_templates.csv` | `template.txt` | Class templates |  Mean and standard deviation of the VisNIR spectra and visual albedos for each class. |
| `class_visnir.csv` | `classvni.txt` | Classifications of the VisNIR sample. |  Classes derived for the 2983 input observations used to derive the taxonomy. |
| `class_vis.csv` | `classvis.txt` | Classifications of the vis-only sample. |  Classes derived for the 2923 input observations containing only visible spectra and albedos. |
| `class_asteroid.csv` | `asteroid.txt` | Class per asteroid |  Aggregated classifications in VisNIR and vis-only samples with one class per asteroid. |
| `ref_spectra.csv` | `refspect.txt` | References of spectra | The key to the spectra references used in the classification tables. |
| `ref_albedo.csv` | `refalbed.txt` | References of albedos |  The key to the albedo references used in the classification tables. |

More information on each file can be found in the [data/mahlke2022/ReadMe](https://github.com/maxmahlke/classy/blob/main/data/ReadMe).

<!-- # Development -->
<!---->
<!-- To be implemented: -->
<!---->
<!-- - [ ] Graphical User Interface -->
<!-- - [ ] Optional automatic addition of SMASS spectra to observations -->
<!-- - [ ] Automatic determination of best smoothing parameters -->

<!-- # Contribute -->

<!-- Computation of asteroid class by weighted average -->

