reggae.reggae.utils

2D polynomial fits; some parts adapted from EXPRES pipeline

Functions

asymptotic_ν_g(n_g, ΔΠ0, max_N2, ε_g, α=None, ν_max=None)

Compute asymptotic g-mode frequencies

fit_poly(n_p, n_g, ν_p, ν_g, L, D[, n_low, order])

Fit upper-triangular matrix coefficients describing 2D polynomials

Module Contents

reggae.reggae.utils.asymptotic_ν_g(n_g, ΔΠ0, max_N2, ε_g, α=0, ν_max=0, l=1)

Compute asymptotic g-mode frequencies

Uses the asymptotic g-mode relation to compute the frequencies of a given set of radial orders n_g and angular degree l, using a fundamental period offset (defined by the maximum Brunt-Vaisala frequency) given period spacing, phase offset and curvature.

Parameters

n_g: array-like

Array of radial orders at which the g-mode frequencies are computed

ΔΠ0: float

The period spacing of the g-modes.

max_N2: float

The maximum of the Brunt-Vaisala frequency, used to define the fundamental period offset.

ε_g: float

Phase offset for the g-modes.

α: float, optional

Curvature factor for the g-mode periods. Default is 0.

ν_max: float, optional

numax of the envelope. Default is 0

l=1: int

Angular degree of the g-modes. Default is 1.

Returns

nuarray-like

An array of g-mode frequencies.

reggae.reggae.utils.fit_poly(n_p, n_g, ν_p, ν_g, L, D, n_low=None, order=2)

Fit upper-triangular matrix coefficients describing 2D polynomials of degree n for the scaled coupling and overlap matrices.

Parameters

n_p: array-like

Array of radial orders for the p-modes.

n_g: array-like

Array of radial order for the g-modes.

nu_p: array-like

Array of frequencies for the p-modes

nu_g: array-like

Array of frequencies for the g-modes

L: array-like

2D array of coupling terms for each combination of p and g modes.

D: array-like

2D array of coupling terms for each combination of p and g modes.

n_low: int, optional

Lowest g-mode radial order. Default is None.

order: int, optional

Polynomial order. Default is 2.

Returns

res: dict

Dictionary of coupling polynomial coefficients p_L and p_D and scaled coupling matrices.