Skip to content

ak3sit0/roAp-oscilation-analysis

Repository files navigation

Asteroseismic Analysis of Rapidly Oscillating Ap Stars

Python 3.9+ License: MIT TESS Mission

Overview

Python framework for asteroseismic analysis of rapidly oscillating Ap (roAp) stars using NASA's TESS mission data. It combines stellar parameters from the TESS Input Catalog with frequency-domain analysis to characterize the physical properties of these rare, magnetically-active A-type pulsators. A Gaia DR3 parallax cross-match is included as an experimental component (see Roadmap).

Why roAp Stars?

roAp stars are valuable laboratories for stellar physics:

  • Rapid pulsations (5–20 minute periods, 100–5000 µHz) probe deep into stellar interiors
  • Strong magnetic fields (1–30 kG) modify oscillation properties and drive mass loss
  • A-type classification spans the transition between radiative and convective envelopes
  • TESS precision improves detection sensitivity compared to ground-based observations

Key Capabilities

Feature Details
Data Access Automated TESS light curve download & preprocessing (lightkurve)
Frequency Analysis Professional Lomb-Scargle periodogram with SNR > 4 peak detection
Seismic Parameters Large frequency separation (Δν), mode identification, amplitude statistics
Stellar Characterization TIC stellar parameters (T_eff, log g) with uncertainties; experimental Gaia DR3 parallax cross-match
Visualization Publication-quality HR diagrams, periodograms, and light curves
Architecture Modular Python package for reproducibility and collaboration

Repository Structure

roAp-Analysis/
├── README.md
├── LICENSE
├── requirements.txt             # Python dependencies
├── environment.yml              # Conda environment
├── setup.cfg                    # Package configuration
│
├── src/roap_analysis/           # Main analysis package
│   ├── __init__.py
│   ├── config.py                # Configuration
│   ├── frequency_analysis.py    # Frequency analysis, peak detection
│   ├── stellar_params.py        # Stellar catalog queries (TIC, Gaia)
│   └── plotting.py              # Visualization
│
├── notebooks/
│   └── main.ipynb               # Complete analysis pipeline
│
├── scripts/
│   └── download_lightcurves.py  # Data download automation
│
├── sequences/                   # MESA evolutionary tracks (1.5–2.5 M☉) — in git
│   └── ms0*z019a.dat
│
├── data/                        # INPUT DATA (not in git, downloaded separately)
│   └── lightcurves/             # TESS light curves (~70 MB)
│       └── TIC_*.csv
│
├── results/                     # OUTPUT (generated by analysis, not in git)
│   ├── tables/
│   │   ├── stellar_catalog.csv
│   │   └── analysis_results.csv
│   └── figures/
│       ├── hr_diagram/
│       ├── periodograms/
│       └── lightcurves/
│
├── docs/
│   └── METHODS.md               # Scientific methods documentation
│
├── conftest.py                  # Makes src/ importable for tests
└── tests/
    └── test_frequency_analysis.py

Quick Start

Installation (< 2 minutes)

# Clone repository
git clone https://github.com/ak3sit0/roAp-oscilation-analysis.git
cd roAp-oscilation-analysis

# Create environment & install
conda env create -f environment.yml
conda activate roap-analysis
pip install -e .

Download Data

Large data files are not stored in git. Download them automatically:

python scripts/download_lightcurves.py

This fetches TESS light curves (~70 MB) from MAST and verifies evolutionary models. Creates data/ directory (ignored by git).

Run Analysis

jupyter notebook notebooks/main.ipynb

This pipeline generates stellar catalogs, seismic parameters, and visualization plots. First run may take 15–20 minutes (includes data download); subsequent runs are faster (~5 min).


Results & Visualizations

After running the analysis, you'll get these outputs:

1. Hertzsprung-Russell Diagram

Observed targets plotted against MESA evolutionary tracks (masses 1.5–2.5 M☉, solar metallicity). Error bars come from the TESS Input Catalog. The targets fall near the main sequence, consistent with their late-A / early-F effective temperatures and mass estimates.

HR Diagram

PDF version

2. Oscillation Spectrum

Power spectrum from Lomb-Scargle periodogram showing significant peaks detected above the SNR > 4 threshold (red peaks). For TIC 101624823 the highest-amplitude peak sits at ~1442 µHz (124.6 d⁻¹); the mean spacing of the significant peaks yields a large frequency separation of Δν ≈ 46 µHz, a characteristic asteroseismic parameter linked to mean stellar density.

Periodogram

PDF version

3. Time Series Photometry

Light curve from TESS showing ~100 days of continuous photometry. TESS noise floor is ~20–100 ppm (depending on stellar magnitude and observing sector). Oscillation amplitudes for roAp stars range 0.5–5 ppm, requiring sensitive space-based photometry.

Light Curves

PDF version

4. Multi-Target Overview

Superimposed amplitude spectra of all analyzed targets, highlighting the frequency ranges where significant peaks are detected across the sample.

Superimposed Periodograms

5. Analysis Results

TIC ID N peaks ν_dom (µHz) Δν (µHz) T_eff (K) log g
101624823 544 1442 45.7 6776±132 3.83±0.09
165052884 155 2177 26.4 6898±127 4.18±0.08
233200244 153 1437 25.9 8218±152 4.07±0.07
158271090 147 973 27.3 7387±141 3.73±0.09
298052991 185 2291 21.8 7596±125 4.31±0.08
435263600 164 1097 24.8

ν_dom is the highest-amplitude peak in the periodogram (may include low-frequency / rotational signal); Δν is the mean spacing of the significant (SNR > 4) peaks. T_eff and log g are from the TESS Input Catalog. Gaia DR3 parallax/luminosity integration is pending (see Roadmap), so those columns are not yet populated.

Generated outputs: results/tables/stellar_catalog.csv and results/tables/analysis_results.csv


Python Script Example

from roap_analysis import periodogram_analysis, calculate_large_separation
import lightkurve as lk

# Download and analyze
lc = lk.read("TIC 101624823", mission="TESS").remove_nans().flatten()
pg, peaks, snr = periodogram_analysis(lc, oversample_factor=5)
delta_nu, _ = calculate_large_separation(pg.frequency.value[peaks])

print(f"Large Separation: Δν = {delta_nu:.5f} d⁻¹")
print(f"Detected {len(peaks)} significant modes")

Scientific Methods

Detailed documentation of all methods is in docs/METHODS.md. Below is a summary:

  1. Lomb-Scargle Periodogram: Frequency analysis for unevenly-sampled TESS data

    • Amplitude normalization in ppm
    • 5-fold oversampling for resolution
    • See Kjeldsen & Bedding (1995)
  2. SNR Peak Detection: Robust noise estimation using Median Absolute Deviation (MAD)

    • Threshold: SNR > 4 (>99.99% confidence)
    • Filters instrumental artifacts
  3. Large Frequency Separation (Δν): Average spacing between consecutive radial modes

    • Links directly to mean stellar density
    • Typical roAp range: 30–100 µHz
    • Calculated from autocorrelation (see METHODS.md for details)
  4. Stellar Parameters: Effective temperature and surface gravity with uncertainties

    • TIC: T_eff, log g and their catalog errors (primary source)
    • Gaia DR3: parallax cross-match for distance/luminosity — experimental, not yet validated for these targets (see Roadmap)

For complete technical documentation: see docs/METHODS.md


Features

  • Automated TESS light curve download and preprocessing via lightkurve
  • Frequency analysis: Lomb-Scargle periodogram with SNR > 4 peak detection
  • Seismic parameter extraction: large frequency separation (Δν) from peak spacing
  • Stellar characterization: TIC parameters (T_eff, log g) with errors; experimental Gaia DR3 parallax cross-match
  • Visualization: HR diagrams with evolutionary tracks and error bars
  • Modular architecture: reproducible, testable Python package

Installation

# Conda (recommended)
conda env create -f environment.yml
conda activate roap-analysis

# or with pip
pip install -r requirements.txt

References

  1. Kurtz (1982) - roAp star discovery - MNRAS 200(4), 807–859
  2. Kjeldsen & Bedding (1995) - Periodogram methods - A&A 293, 87–106
  3. Cunha et al. (2007) - Asteroseismic characterization - A&A 474, 901–924
  4. Ricker et al. (2015) - TESS Mission - J. Astron. Telesc. Instrum. Syst. 1, 014003
  5. Zwintz et al. (2019) - TESS roAp observations - A&A 627, A28
  6. Gaia Collaboration (2023) - Gaia DR3 - A&A 674, A1

Usage Examples

See notebooks/main.ipynb for complete interactive examples.

Batch Analysis

from roap_analysis import get_star_params_professional, periodogram_analysis

targets = ["TIC 101624823", "TIC 165052884", "TIC 233200244"]

for tic_id in targets:
    lc = lk.read(tic_id, mission="TESS").remove_nans().flatten()
    pg, peaks, snr = periodogram_analysis(lc)
    params = get_star_params_professional(tic_id, include_gaia=True)
    # Process results...

Roadmap

Known limitations and planned work:

  • Robust TIC → Gaia DR3 cross-match. The current parallax query matches on a designation LIKE string and does not reliably resolve Gaia sources, so parallax/luminosity columns are not yet populated. Planned: proper cross-match via the Gaia tic_dr3 / tmass_best_neighbour tables or a coordinate cone search, then parallax-based luminosities on the HR diagram.
  • Mode identification. Δν is currently the mean spacing of significant peaks; a full échelle-diagram mode identification (l, n) is planned to firm up the roAp classification.
  • Dominant-frequency filtering. ν_dom may pick up low-frequency rotational/instrumental signal; a pre-whitening / high-pass step targeting the roAp band (100–5000 µHz) is planned.
  • Test coverage. Expand beyond the current smoke tests to cover the periodogram and catalog paths.

Contributing

Contributions are welcome. Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-analysis)
  3. Add tests for new functionality
  4. Submit a pull request with clear description

Run the test suite with:

pip install -e ".[test]"
pytest

Citation

If you use this code, please cite:

@software{ake_roap_2026,
  author  = {Ake, Jos\'e},
  title   = {roAp-oscilation-analysis: Asteroseismic Analysis Framework for Rapidly Oscillating Ap Stars},
  year    = {2026},
  url     = {https://github.com/ak3sit0/roAp-oscilation-analysis},
  version = {1.0.0}
}

License

This project is licensed under the MIT License — see LICENSE file.


Contact

For questions or suggestions:


Status: Research codebase (actively maintained)

Last Updated: July 2026

About

Python framework for asteroseismic analysis of rapidly oscillating Ap (roAp) stars using TESS mission data.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors