Skip to main content

XPy-Teal: XP Tool for Emission and Absorption Lines

Project description

PyPI version

๐ŸŒŒ XPy-Teal: XP Tool for Emission and Absorption Lines

XPy-Teal is a Python version of the tool developed by M. Weiler et al. 2023 for the analysis of Gaia DR3 XP spectra. This repository provides a modular Python toolkit for downloading, processing, and analyzing Gaia DR3 XP (BP/RP) spectra.
It includes tools for XP data retrieval via the Gaia Archive, data calibration, equivalent width measurement, and mathematical utilities for line analysis.

โš ๏ธ Note: The current version only supports the Narrow Line Approximation for equivalent width measurements. See the original paper for more details.

๐Ÿ“ Repository Structure

/
โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ xpy_teal
โ”‚       โ”œโ”€โ”€ Codes
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ”œโ”€โ”€ config.py
โ”‚       โ”‚   โ”œโ”€โ”€ dataIO.py
โ”‚       โ”‚   โ”œโ”€โ”€ download_xp_spectra.py
โ”‚       โ”‚   โ”œโ”€โ”€ line_analysis.py
โ”‚       โ”‚   โ”œโ”€โ”€ main_MareNostrum.py
โ”‚       โ”‚   โ”œโ”€โ”€ math_tools.py
โ”‚       โ”‚   โ”œโ”€โ”€ spectrum_tools.py
โ”‚       โ”‚   โ””โ”€โ”€ xpy_teal_pipeline.py
โ”‚       โ”œโ”€โ”€ Configuration_Data
โ”‚       โ”‚   โ”œโ”€โ”€ BasisTransformationMatrix_BP.csv
โ”‚       โ”‚   โ”œโ”€โ”€ BasisTransformationMatrix_RP.csv
โ”‚       โ”‚   โ”œโ”€โ”€ DerivativeMatrix_D1.csv
โ”‚       โ”‚   โ”œโ”€โ”€ DerivativeMatrix_D2.csv
โ”‚       โ”‚   โ”œโ”€โ”€ DerivativeMatrix_D3.csv
โ”‚       โ”‚   โ”œโ”€โ”€ DerivativeMatrix_D4.csv
โ”‚       โ”‚   โ”œโ”€โ”€ HermiteIntegrals.csv
โ”‚       โ”‚   โ”œโ”€โ”€ LSFModel_BP.csv
โ”‚       โ”‚   โ”œโ”€โ”€ LSFModel_RP.csv
โ”‚       โ”‚   โ”œโ”€โ”€ RootMatrix_H.csv
โ”‚       โ”‚   โ”œโ”€โ”€ bpC03_v375wi_dispersion.csv
โ”‚       โ”‚   โ”œโ”€โ”€ bpC03_v375wi_response.csv
โ”‚       โ”‚   โ”œโ”€โ”€ rpC03_v142r_dispersion.csv
โ”‚       โ”‚   โ””โ”€โ”€ rpC03_v142r_response.csv
โ”‚       โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ examples
โ”‚   โ”œโ”€โ”€ XPy_TEAL_Results
โ”‚   โ”‚   โ”œโ”€โ”€ Test_EqWidths.csv
โ”‚   โ”‚   โ”œโ”€โ”€ Test_Extrema.pkl
โ”‚   โ”‚   โ””โ”€โ”€ xp_continuous_downloaded.csv
โ”‚   โ”œโ”€โ”€ XPy_TEAL_config.xml
โ”‚   โ”œโ”€โ”€ source_ids.csv
โ”‚   โ””โ”€โ”€ tutorial.ipynb
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ uv.lock



โš™๏ธ Installation

โšก Option 1 โ€” Using uv (recommended for speed)

uv is a fast, modern Python package manager built by Astral โ€” it handles environments, dependencies, and builds efficiently.

๐Ÿช„ Step 1 โ€” Install uv

If you donโ€™t have it already, install with:

pip install uv

or (recommended):

curl -LsSf https://astral.sh/uv/install.sh | sh

โš™๏ธ Step 2 โ€” Install XPy-Teal In the root of this repository, run:

uv pip install xpy-teal

๐Ÿš€ Step 3 โ€” uv sync

uv sync

๐Ÿš€ Usage

Here is a simple example of how to use XPy-Teal to run the analysis pipeline on a table of source IDs from Gaia DR3.

from xpy_teal import xpy_teal_pipeline as xpy

results = xpy.run_pipeline(sources_table)

๐Ÿ“„ License

GNU GENERAL PUBLIC LICENSE


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xpy_teal-1.1.1.tar.gz (360.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xpy_teal-1.1.1-py3-none-any.whl (272.3 kB view details)

Uploaded Python 3

File details

Details for the file xpy_teal-1.1.1.tar.gz.

File metadata

  • Download URL: xpy_teal-1.1.1.tar.gz
  • Upload date:
  • Size: 360.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for xpy_teal-1.1.1.tar.gz
Algorithm Hash digest
SHA256 01983dcf3079f2d67244d8622eee42c835517334d89c6b8e971c9684195cd800
MD5 68e25fff5a445a3188d0432b6a48fc63
BLAKE2b-256 5430a0d4e02fcbe77690751bc3353af6dce3e4ece248c495c4ac4327912fa223

See more details on using hashes here.

File details

Details for the file xpy_teal-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: xpy_teal-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 272.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for xpy_teal-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e72ce9faa9a488a9ee52daabbc6a0be7d1699cfe9600e1fb8c58e0f1870d63f
MD5 c5de2ea555b047f6620742e2d4247f44
BLAKE2b-256 229e3fad04c9ea60d122ad835ab8921052a0a02052616ebc7f3d47729ff657c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page