Metadata-Version: 2.4
Name: speXtra
Version: 0.43.4
Summary: Tool to manage and manipulate astronomical spectra.
License: MIT
License-File: LICENSE
Keywords: astronomy
Author: Miguel Verdugo
Author-email: mverduol@gmail.com
Maintainer: Kieran Leschinski
Maintainer-email: kieran.leschinski@unive.ac.at
Requires-Python: >=3.10,<3.15
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Dist: astar-utils (>=0.5.0,<1.0)
Requires-Dist: astropy (>=6.1.7,<8.0.0) ; python_version >= "3.10" and python_version < "3.13"
Requires-Dist: astropy (>=7.0.2,<8.0.0) ; python_version >= "3.13"
Requires-Dist: more-itertools (>=10.2.0,<11.0.0)
Requires-Dist: numpy (>=1.26.4,<2.3.0) ; python_version >= "3.10" and python_version < "3.13"
Requires-Dist: numpy (>=2.3.5,<3.0.0) ; python_version >= "3.13"
Requires-Dist: pooch (>=1.9.0,<2.0.0)
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
Requires-Dist: scipy (>=1.15.3,<1.16.0) ; python_version == "3.10"
Requires-Dist: scipy (>=1.17.0,<1.18.0) ; python_version >= "3.11"
Requires-Dist: synphot (>=1.6.1,<2.0.0)
Requires-Dist: tqdm (>=4.67.1,<5.0.0)
Project-URL: Bug Tracker, https://github.com/AstarVienna/speXtra/issues
Project-URL: Changelog, https://github.com/AstarVienna/speXtra/blob/main/CHANGELOG.md
Project-URL: Documentation, https://spextra.readthedocs.io/en/stable/
Project-URL: Repository, https://github.com/AstarVienna/speXtra
Description-Content-Type: text/markdown

<img src="https://raw.githubusercontent.com/AstarVienna/spextra/main/docs/_static/images/speXtra_logo.png" width="400pt">

# SpeXtra

[![Tests](https://github.com/AstarVienna/speXtra/actions/workflows/tests.yml/badge.svg)](https://github.com/AstarVienna/speXtra/actions/workflows/tests.yml)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![dev version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FAstarVienna%2FspeXtra%2Fmain%2Fpyproject.toml&query=%24.project.version&label=dev%20version&color=teal)
![GitHub Release Date](https://img.shields.io/github/release-date/AstarVienna/speXtra)

[![Documentation Status](https://readthedocs.org/projects/spextra/badge/?version=latest)](https://speXtra.readthedocs.io/en/latest)
[![codecov](https://codecov.io/gh/AstarVienna/speXtra/graph/badge.svg)](https://codecov.io/gh/AstarVienna/speXtra)
[![PyPI - Version](https://img.shields.io/pypi/v/speXtra)](https://pypi.org/project/speXtra/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/speXtra)

![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

A python tool to manage and manipulate astronomical spectra


## Description

``speXtra`` is a python tool to download, load, display and manipulate spectra of astronomical sources.
It has developed to provide spectral sources to [ScopeSim](https://scopesim.readthedocs.io/en/latest/) but it may be helpful for other purposes too.

speXtra stands in the shoulder of giants: [synphot](https://synphot.readthedocs.io/en/latest/) and [astropy](https://www.astropy.org/).

To install ``spextra`` simply run:

```bash
pip install spextra
```

## Functionalities

``speXtra`` is able to:

- Download spectra from a database and return it in format compatible with ``synphot`` format.

```python
from spextra import Spextrum
sp = Spextrum("kc96/s0")
```

and it will load the S0 galaxy template of the Kinney-Calzetti spectral library. To quickly
plot the resulting spectra, simply type

```python
sp.plot()
```
<img src="https://raw.githubusercontent.com/AstarVienna/spextra/main/docs/_static/images/kc96_S0.png" width="400pt">

