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.2.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.2-py3-none-any.whl (272.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xpy_teal-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 14603cc4dda9abc6e30400de55ebca38714efa0ed6c246ca2069be773d9b85d0
MD5 a66367d52ac93da8d9d0f2779ede1f9a
BLAKE2b-256 b1c6e46b1e2ddea4e596874429ce19f06f9dfa32b375e0bd004ab72e1f3a24bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xpy_teal-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81e33fcae2bd7af42191eb0364bb3ea7cacbf8172155789497c21d8a1f4240d2
MD5 e6487f9d42f4b38bd7537123ebe6986f
BLAKE2b-256 189f9e3302a617824afadc475a3eeb941a3da8e5a9d223052b101a4dd86a45b5

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