Skip to main content

XPy-Teal: XP Tool for Emission and Absorption Lines

Project description

๐ŸŒŒ 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.0.1.tar.gz (359.8 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.0.1-py3-none-any.whl (271.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xpy_teal-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0df0d1005f349b5aa10f599bb952211633ff9ee16d87fc39bd334e8ed121786d
MD5 8159f1e43eedcb1f421e4f565ce6a616
BLAKE2b-256 32c8040dccb2a0160f51584ba50e85355b1cd7426e1b1a9493174d32b7e708b5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xpy_teal-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbccff027b45cf4df1b5dd76758c999d5f7cdbad5429928e898b6ea5f844cc5e
MD5 e441b63e78d904ca0de361cef808f3d6
BLAKE2b-256 bfa622815a0a2f451c6769cc47dc5dea13c891779778a5375809fcdeea777698

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