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.1.0.tar.gz (360.1 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.0-py3-none-any.whl (272.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xpy_teal-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7592ab6a26767951c78236845a4cfc9bf8e82e269f893868318f7a3a207f950f
MD5 4f90cfcd25f7b14a105c648ee60f972b
BLAKE2b-256 9b98fc6ee668a7e5b49a39c9bb4c300427e4d8a2292aecff9a2f9f973e50fa6d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xpy_teal-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 331886cc6113c823909a729fe0bdb153760287031637721779cb54ef12d870b0
MD5 972adfb0d5b5770cff5561c467488020
BLAKE2b-256 0082704c67d7150f272b87747ae5cd07ae21b012df60e96329f4ae6f7febe50f

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