---
title: "Test a red giant model with TESS data"
description: "Fit HD128279 lightcurves and compare the modes with new calculations from eight native structures, testing windows, noise and surface corrections."
canonical_url: "https://sandboxphysics.com/stories/stellar-seismology/tess-red-giant-model/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/stellar-seismology/tess-red-giant-model/"
last_modified: "2026-11-03"
---

[Read the interior of a star](https://sandboxphysics.com/stories/stellar-seismology/)

AC26 · L3

# Test a red giant model with TESS data

Sandbox Physics · 2026-11-03

You can trace this comparison from the actual lightcurve files to visible radial and dipole rhythms, then to a licensed model of the same star. Open Lindsay et al. 2025, arXiv:2507.01091v1, beside the data: Figure 3, Table 3 and Figure 5 connect the observations, mode identities and model comparison. The supplied Python package reproduces the small-data calculations offline.

## Before you begin

Read From a light curve to stellar modes, or be comfortable with time series and basic Python. The replay needs NumPy, SciPy and Matplotlib; all fixed scientific inputs are included.

## Start with the exact two observing windows

The target HD128279 is TIC13727. The package contains the original TESS SPOC lightcurves for sectors 38 and 65, source releases 55 and 98. Their filenames preserve the pipeline product identities. Do not replace them with a nearby star, a different detrending product or a convenient demonstration curve.

Read the primary header first. TICID identifies the star and SECTOR identifies the observing visit. TIME is barycentric dynamical time in days after BJD2457000. PDCSAP\_FLUX is calibrated aperture flux in electrons per second, with a corresponding uncertainty column. QUALITY is a bitmask, not another brightness measurement.

The strict exercise retains quality-zero samples with finite times and fluxes and finite positive flux errors. This leaves 18248 samples in sector 38 and 16819 in sector 65. File hashes and every FITS data-unit checksum are checked before those selections. A complete file can still contain observations that should be rejected by the quality rule.

```
python3 verify_inputs.py .
PYTHONDONTWRITEBYTECODE=1 PYTHONWARNINGS=error::RuntimeWarning python3 science/replay.py --inputs input --out-dir rerun
```

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · MAST public data use and acknowledgment

## Keep a two-year gap visible in the method

The two sector spans add to about 51.8 days, but the first and last retained times are almost 760 days apart. Plotting them on the actual time axis reveals the long empty interval immediately. Filling it with zeros would manufacture observations; compressing it would change the frequency window.

Normalize each sector by its median flux and express the changes in parts per million. Remove its fitted mean and linear trend, saving that choice with the output. The discovery calculation then evaluates a Lomb–Scargle periodogram for each sector separately and averages their powers. It treats the two sectors as independent stochastic observations across the long gap.

This periodogram is an RSS-reduction statistic divided by the number of samples and a local running-median background. Its plotted ratio is dimensionless. The densely sampled frequencies remain correlated; a probability model must account for that dependence.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · MAST public data use and acknowledgment

## Locate the radial ladder and test its sensitivity

The broad comb gives a blind autocorrelation candidate near 15.8 microhertz. Next inspect the four published radial-mode neighborhoods. On the 0.02 microhertz discovery grid, the averaged periodogram has local maxima near 177.000, 192.740, 208.880 and 225.480 microhertz in the received frame. These locations are direct features of these saved observations.

Now repeat the calculation with each sector alone. Sector 38 places the first local maximum near 176.40 microhertz. Sector 65 places the last search maximum near 224.66 microhertz, at the search edge. The latter is a warning that the selected neighborhood does not contain a reliable isolated mode maximum in that segment. Averaging two sectors does not turn each individual maximum into a precise frequency measurement.

The audit also compares a constant PDC baseline and a linearly detrended SAP lightcurve. For example, the SAP calculation puts the third maximum near 209.08 microhertz, compared with 208.88 in the default PDC calculation. These differences are processing and realization sensitivities, not independent confidence intervals.

A local maximum depends on the mode lifetime, blending, noise and the observing window. The published 0.234 microhertz frequency errors came from the paper’s analysis and adopted floor. They belong to that external mode table, not to our local-maximum estimator.

$$
\overline{\Delta\nu}_{\rm four\ peaks}=\frac{225.480-177.000}{3}\,\mathrm{\mu Hz}=16.160\,\mathrm{\mu Hz}
$$

This is the mean separation across these four local maxima. It is a different statistic from the blind autocorrelation candidate or the paper’s fitted global large spacing.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive

## Put the catalog and the telescope in the same frequency frame

The published HD128279 frequencies were corrected for the star’s line-of-sight velocity. Our lightcurve spectrum describes the received rhythm. Barycentric timestamps correct the observer’s changing position; they do not by themselves remove the star’s radial velocity.

Use the source Gaia radial velocity of minus 75.68 kilometers per second and the relativistic frequency factor below. For this approaching star, the emitted frequency is slightly smaller than the received frequency. Apply the conversion once, keeping both columns.

For example, the source radial frequency 176.918 microhertz corresponds to about 176.963 microhertz in the received frame. Comparing 176.918 directly to the observed 177.000 would mix reference frames. The correction is small here but systematic across the modes.

$$
\nu_{\rm emitted}=\nu_{\rm received}\sqrt{\frac{1+\beta}{1-\beta}},\qquad\beta=v_{\rm radial}/c
$$

Positive radial velocity is recession. Source-table uncertainties scale by the same factor. Discovery maxima retain their separate processing and window-sensitivity labels.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive

## Inspect the extra dipole rhythms

The source table assigns eight peaks to dipole modes. In the averaged TESS spectrum, source-guided neighborhoods contain maxima near 184.22 and 185.72 microhertz, and near 200.00 and 201.66 microhertz. Multiple dipole candidates occur within a radial-mode interval. Their externally assigned identities and nearby observed power are consistent with mixed-mode structure.

Keep the identification step visible. The degree labels come from the published table; the local maxima come from our lightcurves. A background-normalized peak height is not a blind false-alarm probability. Some maxima can be shifted by blending, and a sparse sequence does not uniquely assign every gravity-mode radial order.

The Kepler extension uses KIC3860179 Q7–Q9 DR25. Quality filtering retains 3700, 2780 and 4283 samples across 275.69 days, with actual interruptions preserved. The packaged producer computes its spectral correlation: the strongest spacing candidate is 15.16 microhertz, compared with the catalog value 15.200537. An earlier preflight gave 15.18 with a different background/grid definition; the method change is preserved with the number.

The Kepler dipole bin\_points file supplies 15 rough seeds, not fitted frequencies with errors. For example, seed 193.4616 has a local maximum near 193.46 microhertz, while seed 195.2116 leads to a maximum near 195.40 within the declared search band. A neighboring azimuthal component or noise may win the search. Those candidates are saved without converting their adjacent period differences into a measured pure-gravity spacing or a core rotation rate.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive · Li, Deheuvels & Ballot, Zenodo13207485 v2

## Put sixteen components in one fitted model

Open real-multimode-fit.json. Its supports field contains the four radial, eight dipole and four quadrupole literature identities and their search half-widths of 0.65 microhertz. The frequencies and strengths under estimatesByAssumedLifetime come from our joint fit to the saved lightcurves.

The calculation converts the exposure covariance of stochastic damped oscillators into an expected spectrum through each actual quality-mask window, then adds neighbouring modes and a local background. At an assumed 8-day damping time, one dipole pair lies at 184.186 and 185.936 microhertz. The 2-day fit gives 184.379 and 185.969; several components become weak or reach search edges at 0.5 days.

Each sector contributes its own power spectrum. The fast calculation places retained times on their nearest 120-second cadence positions. Direct Fourier projections at the original timestamps test that approximation: fitted frequencies change by at most 0.0198 microhertz here. Exposure, lifetime and background remain declared model conditions.

The spectrum contrast finds a set of point estimates. Correlated oversampled bins are not assigned an independent-bin probability or a precise posterior. The injection experiment below tests frequency recovery directly in these windows.

```
python3 science/fit_real_modes.py --inputs input --out rerun/real-multimode-fit.json
```

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive

## Read a complete model of the same star

The licensed source archive supplies one fixed-physics HD128279 evolutionary track with 327 history rows and 327 GYRE structural profiles. The scientific package includes its complete history/index and eight selected complete structures. The first saved history point is already after main-sequence evolution; its age is the model’s absolute stellar age, not time elapsed since this particular file began.

Profile 269 corresponds to source model 546. It has radius about 3.79976 solar radii, effective temperature 5458.11 kelvin and luminosity 11.5445 solar luminosities, matching the reported best-model properties at their quoted precision. Its track age is 12.52304 billion years. That age is a property of this fixed model family.

Read the GYRE101 header and units before integrating. Radius is in centimeters, pressure in barye, density in grams per cubic centimeter and Gamma1 is dimensionless. The sound speed follows from the thermodynamic derivative below. The outermost atmosphere point extends beyond the photospheric radius named in the header, so the two endpoints must be distinguished.

For this profile, the photospheric acoustic integral gives about 17.4801 microhertz, and including the supplied atmosphere gives 16.5624 microhertz. A thin outer region matters because sound is slow there. Neither number is automatically equal to a finite-order radial-mode separation.

$$
c(r)=\sqrt{\Gamma_1P/\rho},\qquad\tau_{\rm acoustic}=\int\frac{dr}{c(r)},\qquad\Delta\nu_{\rm asym}=\frac{1}{2\tau_{\rm acoustic}}
$$

The endpoint of the integral is part of the model definition. Convert CGS lengths and speeds together so the travel time remains in seconds.

Reading: Lindsay et al., Zenodo15102877 v1 model/observed-mode archive · GYRE MESA file format version 1.01 · Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams

## Compare quantities that have different definitions

The history column called delta\_nu is particularly easy to misread. The original inlist explicitly enables get\_delta\_nu\_from\_scaled\_solar. All 327 values follow one solar mean-density scaling normalization, about 134.650015 microhertz. They are not a sequence of GYRE eigenfrequencies. Profile 269 has a scaled value 15.94972 microhertz.

The published uncorrected GYRE frequencies for the four radial modes have a mean consecutive difference of 16.17053 microhertz. Their corrected counterparts give 16.20265. The source observed four-mode mean is 16.15882; our received-frame local-peak mean is 16.16000. The paper’s global fitted large spacing is 15.87, while the discovery autocorrelation candidate is 15.8. Keep each definition and frequency band attached to its number.

The source best-model table gives corrected and uncorrected dipole columns with different row ordering. Subtracting them row by row can produce enormous fictitious surface shifts. The audit compares correctly associated corrected model/observed rows and leaves uncorrected dipole shifts unassigned until mode identities are matched.

Those external frequencies help check definitions. Comparing our own fitted frequencies along the track also requires a mode calculation for each supplied structure. That is the next step.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive

## Calculate modes for each of the eight structures

The model-grid directory contains new GYRE7.2.1 frequencies, inertias and pressure/gravity node counts from the eight original structures. The full adiabatic equations allow coupling between acoustic and gravity cavities. Node counts label branches; inertia describes the amount of stellar material participating at the stated surface normalization.

Start with adjacent profiles 267, 269 and 271. Their calculation domains contain 145, 145 and 147 modes. Higher-order integration with doubled spatial weights and frequency scanning preserves every node identity and count. The largest frequency change is about 0.00182 microhertz. This checks numerical discretization; observational errors require a separate calculation.

compare\_model\_grid.py reads our fittedEmittedMicroHz values and matches modes one-to-one within the known degree. For the 8-day fit, the sixteen-mode raw RMS residuals for 267, 269 and 271 are 1.3815, 0.2998 and 1.0270 microhertz. Inspect the three alternative branches saved beside each match, including their inertias and nodes. Dense gravity-dominated branches offer many close frequency matches; proximity alone cannot establish visibility.

Fit two inertia-weighted surface terms to only our four radial estimates. The corresponding distances become 0.5236, 0.2762 and 0.3849 microhertz. Under the 0.5-day lifetime assumption, the surface-adjusted minimum moves to 271. Surface freedom can absorb structural differences, so examine both comparisons. These distances are not likelihoods built from validated real frequency errors.

The default offline replay reads the frozen GYRE outputs and recomputes the photometry analysis and model comparison. tools/GYRE-rebuild.md gives a separate command that regenerates the modes with an already installed GYRE. Complete structures and inlists are supplied. Recorded research execution proves that regeneration was performed; the ordinary reader replay does not install or run the solver. Track age remains a property conditional on fixed initial physics.

```
python3 science/compare_model_grid.py --inputs input --fit rerun/real-multimode-fit.json --grid model-grid --refined model-refined --out rerun/real-mode-grid-comparison.json
```

Reading: GYRE7.2.1 official release and source · Lindsay et al., Zenodo15102877 v1 model/observed-mode archive · Ball & Gizon 2014, A new correction of stellar oscillation frequencies for near-surface effects

## Test the failures with known truth

multimode-injection-calibration.json contains three sets of 96 trials. An independent numerical exposure integral and Gaussian-process sampler generate measurements through the actual quality gaps. The fitting program reads saved powers. True frequencies are stored separately and used afterward to evaluate errors.

The first set uses an 8-day lifetime; the others test a shorter mismatched lifetime and a crowded dipole pair. Error quantiles from 48 training records define empirical intervals, which are evaluated on 48 independent heldout records. The lowest component coverage is 38 of 48. These injections use white measurement noise at declared amplitudes; they do not calibrate the real red background or a blind-search false-alarm probability.

A further experiment selects sixteen actual frequencies from the newly computed profile269 modes and generates 48 observations with the same windows, finite exposure and stipulated photometric amplitudes. Raw frequency comparison selects 269 in all 48. Allowing surface corrections selects 269 in 45, 267 in 1 and 271 in 2. This tests recovery of that specified frequency pattern and gives concrete neighbouring-structure mistakes.

Open the regenerated real-lightcurve-to-grid.png. Its top panel overlays real power and the fitted mean spectrum; the middle folds our estimated frequencies by 15.8 microhertz; the bottom compares the three adjacent structures. Every curve retains its lifetime and surface assumptions. No precise age error bar is inferred from this single track.

Reading: Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams · GYRE7.2.1 official release and source

## Check exposure, then save the complete chain of steps

The headers describe a cadence assembled from shorter exposures. At 190 microhertz, the nominal TESS frame comb has amplitude response about 0.999145; the Kepler long-cadence comb gives about 0.824924. Their power responses are the squares. The audit compares the actual nominal frame-comb expression with a box spanning the cadence and with a box spanning only summed integration time.

TESS also records a dead-time/mitigation factor. The retained per-frame weights are not supplied, so the nominal uniform comb is an approximation. The header EXPOSURE is a total exposure in days, not the length of one sample. It must not be substituted as a cadence or multiplied into an already calibrated flux a second time.

The replay keeps original files, masks, references, candidate searches, sensitivities and separate spacing definitions. Its output-verification step checks the numerical results and leaves the known-mode coverage failure intact. The final result is a reproducible observation-to-model comparison, with the additional information needed for a full stellar inference plainly identified.

Reading: MAST public data use and acknowledgment · Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams

## Exercises and explanations

1. Why does a surface-adjusted minimum at271 under a short-lifetime assumption not establish the age of profile271?

   Read the explanation

   Lifetime changes the frequencies extracted from the lightcurve, surface terms absorb some structural shifts, and dense gravity-mode branches permit alternative matches. The rank change exposes that conditional sensitivity. These structures sample one fixed-physics track, and the distance has not become an age probability calibrated with real frequency errors.

2. Why can the mean spacing of four observed radial peaks differ from the reported global large spacing?

   Read the explanation

   They use different definitions and frequency weighting, and the radial spacing can vary across the finite-order spectrum. The four-peak mean here is 16.160 microhertz, while the published global value is 15.87. Their labels and bands should remain attached; forcing them equal would alter the result.

3. Which two saved quantities immediately reveal that the TESS data do not provide 760 days of continuously observed stochastic motion?

   Read the explanation

   The actual time stamps show the long gap, while the summed sector spans are only about 51.8 days. A stochastic model must also account for mode lifetime when connecting the sectors.

4. Profile 269 matches the published best radius and has an age. Why is that not an independently measured age interval?

   Read the explanation

   Its age is conditional on one specified initial-physics track. Measuring an age interval also requires variation of mass, composition, mixing and other model choices across the optimization ensemble.

## Try the prediction

### [Change a layer and read its modes](https://sandboxphysics.com/labs/stellar-oscillation-modes/)

1. Open the actual-data section and choose TESS. Identify the orange radial references and the additional source-labeled modes.
2. Switch to Kepler and compare the richer frequency structure. Keep the separate actual-model sound-speed plot distinct from the controllable acoustic toy.
3. Run the detached package and inspect one search-edge failure and one processing sensitivity before interpreting a peak as a precise mode.

## Standalone science materials

[Download the scientific ZIP](https://sandboxphysics.com/stories/stellar-seismology/materials/stellar-seismology-science.zip) · [Read the setup and source instructions](https://sandboxphysics.com/stories/stellar-seismology/materials/README.md)

The detached package includes complete small licensed observations and model members. Its known-truth and real-data exercises replay offline without the website or an evolution-code installation.

[Previous: From a light curve to stellar modes](https://sandboxphysics.com/stories/stellar-seismology/lightcurves-modes-and-windows/) [Next: Read core rotation from mixed modes](https://sandboxphysics.com/stories/stellar-seismology/mixed-modes-core-rotation/)

## Sources and calculation scope

1. [GYRE7.2.1 official release and source](https://github.com/rhdtownsend/gyre/releases/tag/v7.2.1)

   Pinned solver release used to recompute full adiabatic degree0/1/2 frequencies, inertia and pressure/gravity nodes from the eight original structures. Build recipe, original SHA256s and actual execution receipts accompany the scientific package.

2. [GYRE MESA file format version 1.01](https://gyre.readthedocs.io/en/stable/ref-guide/stellar-models/mesa-file-format-v1.01.html)

   Exact header/column definitions and CGS units of the complete licensed structural members.

3. [Lindsay et al. 2025, Precise Asteroseismic Ages for the Helmi Streams](https://arxiv.org/html/2507.01091v1)

   Pinned arXiv2507.01091v1; sections II.2/III/V.3/V.4, Figures 3/5, Tables 3/4/6 and Appendix A. Published as ApJ 989, 189; full optimization and its age errors are external results.

4. [Lindsay et al., Zenodo15102877 v1 model/observed-mode archive](https://zenodo.org/records/15102877)

   CC-BY4 dataset metadata; complete selected HD128279 observations, history/index, eight GYRE structures and published mode tables. One fixed-physics track, not the 840-track optimizer ensemble.

5. [Li, Deheuvels & Ballot, Zenodo13207485 v2](https://zenodo.org/records/13207485)

   CC-BY4 rotation catalog and selected KIC3860179 mode files. Dipole bin\_points are approximate seeds; fitted l0/l2 tables have separate uncertainties. Ambiguous auxiliary fields remain excluded.

6. [MAST public data use and acknowledgment](https://stdatu.stsci.edu/publishing/data-use)

   Original mission PUBLIC products downloaded using the supplied MAST product URI; preserve NASA/Kepler/TESS/SPOC/STScI attributions and frozen data releases.

7. [Ball & Gizon 2014, A new correction of stellar oscillation frequencies for near-surface effects](https://arxiv.org/abs/1408.0986)

   Inverse/cubic inertia-weighted surface terms; Lindsay2025 Appendix A supplies the concrete application. The original paper has a corrigendum DOI10.1051/0004-6361/201424325e; this course does not claim a full independent reproduction.
