# Buoyancy glitches in pulsating stars revisited

Margarida S Cunha, Yuri C Damasceno, Juliana Amaral, Anselmo Falorca, Jørgen Christensen-Dalsgaard, Pedro P Avelino

► To cite this version:

Margarida S Cunha, Yuri C Damasceno, Juliana Amaral, Anselmo Falorca, Jørgen Christensen-Dalsgaard, et al., Buoyancy glitches in pulsating stars revisited. Astronomy & Astrophysics - A&A, 2024, 687, pp.A100. 10.1051/0004-6361/202348681. hal-04593967

HAL Id: hal-04593967

https://hal.science/hal-04593967v1

Submitted on 19 Jul 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Buoyancy glitches in pulsating stars revisited

Margarida S. Cunha<fnref n="1" />,<fnref n="2" />,✉, Yuri C. Damasceno<fnref n="1" />,<fnref n="3" />,✉, Juliana Amaral<fnref n="1" />,<fnref n="3" />, Anselmo Falorca<fnref n="1" />,<fnref n="3" />,✉,
Jørgen Christensen-Dalsgaard<fnref n="4" />,✉, and Pedro P. Avelino<fnref n="1" />,<fnref n="2" />,<fnref n="3" />✉

Received 20 November 2023 / Accepted 9 April 2024

## ABSTRACT

Sharp structural variations induce specific signatures on stellar pulsations that can be studied to infer localised information on the stratification of the star. This information is key to improve our understanding of the physical processes that lead to the structural variations and how to model them. Here we revisit and extend the analysis of the signature of different types of buoyancy glitches in gravity-mode and mixed-mode pulsators presented in earlier works, including glitches with step-like, Gaussian-like, and Dirac-δ-like shapes. In particular, we provide analytical expressions for the perturbations to the periods and show that these can be reliably used in place of the expressions provided for the period spacings, with the advantage that the use of the new expressions does not require modes with consecutive radial orders to be observed. Based on a comparison with two limit cases and on simulated data, we further tested the accuracy of the expression for the Gaussian-like glitch signature whose derivation in an earlier work involved a significant approximation. We find that the least reliable glitch parameter inferred from fitting that expression is the amplitude, which can be up to a factor of two larger than the true amplitude, reaching this limit when the glitch is small. We further discuss the impact on the glitch signature of considering a glitch in the inner and outer half of the *g*-mode cavity, emphasising the break of symmetry that takes place in the case of mixed-mode pulsators.

**Key words.** stars: evolution – stars: interiors – stars: oscillations

## 1. Introduction

Space-born experiments, such as the Convection, Rotation and planetary Transits (CoRoT; Baglin et al. 2006), *Kepler* (Borucki et al. 2010; Gilliland et al. 2010), and the Transit-ing Exoplanet Survey Satellite (TESS; Ricker et al. 2015) have fuelled the field of stellar structure and evolution by providing exquisite data sets on stellar pulsations that are explored via asteroseismology (Aerts et al. 2010; Cunha et al. 2007; Cunha 2018). One of the promising methods employed to infer details of the internal structure and dynamics of stars is based on the study of glitch signatures, that is, the signatures left on the fre-quencies or periods of the oscillations by regions of sharp struc-tural variations. Here ‘sharp’ means that the characteristic scale of the structural variation is comparable to or smaller than the local wavelength of the waves to be studied (see Cunha 2020, for a review).

The potential of studying signatures of acoustic glitches associated with the base of the convective enve-lope and the helium ionisation zone has been recog-nised since the early days of helioseismology (e.g. Hill & Rosenwald 1986; Thompson 1988; Gough & Thompson 1988; Vorontsov 1988; Gough et al. 1990). In this con-text, numerous theoretical and observational studies have been published focussing on the Sun (e.g. Basu et al. 1994; Monteiro et al. 1994; Roxburgh & Vorontsov 1994;

Christensen-Dalsgaard et al. 1995; Basu 1997; Monteiro et al. 2000; Monteiro & Thompson 2005; Houdek & Gough 2007; Roxburgh 2009; Christensen-Dalsgaard et al. 2011) and on other solar-like pulsators, including main-sequence (e.g. Roxburgh & Vorontsov 2001; Ballot et al. 2004; Basu et al. 2004; Lebreton & Goupil 2012; Mazumdar et al. 2014; Verma et al. 2014, 2017, 2019; Farnir et al. 2019; Deal et al. 2023) and red-giant stars (Miglio et al. 2010; Broomhall et al. 2014; Corsaro et al. 2015; Dréau et al. 2020; Saunders et al. 2023).

The potential of using acoustic modes to extract information on sharp structural variations located in stellar cores has also been discussed in the literature (e.g. Audard & Provost 1994; Roxburgh & Vorontsov 1999, 2001; Mazumdar et al. 2006; Cunha & Metcalfe 2007; Cunha & Brandão 2011; Lindsay et al. 2023), although the realisation of this potential proved more challenging, particularly for deep glitches such as those asso-ciated with small convective cores. A more promising approach to detect the seismic impact of these core structural variations is to look for glitch signatures in the periods or frequencies of gravity (*g*) or mixed modes, when these are available. The seis-mic signatures of such buoyancy glitches and the mode trap-ping they induce have also received the attention of numerous works, including works focussing on white dwarfs (e.g. Winget et al. 1981, 1991; Brassard et al. 1992; Benvenuto et al. 2002; Córsico et al. 2002), intermediate and massive main-

<footnote n="1">¹ Instituto de Astrofísica e Ciências do Espaço, Universidade do Porto, CAUP, Rua das Estrelas, 4150-762 Porto, Portugal
e-mail: mcunha@astro.up.pt</footnote>

<footnote n="2">² Université Côte d'Azur, Observatoire de la Côte d'Azur, CNRS, Laboratoire Lagrange, Bd de l'Observatoire, 34229, 06304 Nice cedex 4, France</footnote>

<footnote n="3">³ Departamento de Física e Astronomia, Faculdade de Ciências, Universidade do Porto, Rua do Campo Alegre 687, 4169-007 Porto, Portugal</footnote>

<footnote n="4">⁴ Stellar Astrophysics Centre, Department of Physics and Astronomy, Aarhus University, Ny Munkegade 120, 8000 Aarhus C, Denmark</footnote>
sequence stars (e.g. Miglio et al. 2008; Degroote et al. 2010; Kurtz et al. 2014; Van Reeth et al. 2015; Cunha et al. 2019; Mombarg et al. 2022), subdwarf O and B (sdO, sdB) stars (e.g. Charpinet et al. 2000, 2002; Rodríguez-López et al. 2010; Østensen et al. 2014; Baran et al. 2017; Ghasemi et al. 2017; Uzundag et al. 2017), and red-giant stars (e.g. Mosser et al. 2015; Cunha et al. 2015, 2019; Jiang et al. 2022; Vrard et al. 2022). Recently, the theoretical problem has been addressed in a more general angle by considering the eigenvalue condition built up from a series of resonant cavities (Pinçon & Takata 2022).

Different methodologies can be considered for extracting information contained in glitch signatures. A common approach is to produce a set of stellar models by varying particular aspects of the stellar physics in an attempt to reproduce the glitch signature. An alternative approach of greater relevance to the present work is to develop an analytical description of the glitch signature that enables the extraction of the glitch properties (e.g. location and amplitude) directly from fitting the data, without having to recur to specific stellar models. This ‘model-independent’ approach was considered in the context of main-sequence g-mode pulsators by Miglio et al. (2008) under the assumption that the impact of the glitch on the pulsation periods can be treated as a small perturbation (i.e. using a variational approach), which is often not the case. When the glitch impact on the pulsation periods is not small, perturbations to the pulsation periods may be derived instead by matching the wave solutions on each side of the glitch. This approach was used by Cunha et al. (2015, 2019) to derive analytical expressions for the period spacings of g-mode and mixed-mode pulsators in the presence of buoyancy glitches with different shapes, namely, Dirac-δ-like, step-like, and Gaussian-like glitches. Following the same approach, Hatta (2023) has recently considered, in addition, the impact on the period spacings of g-mode pulsators of a buoyancy glitch with a ramp-like shape.

Period spacings can only be computed when modes of consecutive radial order are observed. However, often not all radial orders in a sequence are detected (e.g. Østensen et al. 2014), while enough information is still available to estimate the asymptotic period spacing. In these cases, one would expect that fitting the observed periods directly would be a good alternative, regardless of them being consecutive or not. This also has the advantage of avoiding approximations introduced in the analytical analysis presented in earlier works when relating the perturbation in the periods to the perturbations in the period spacings (cf. Eq. (34) in Christensen-Dalsgaard 2012). With this in mind, in the present work we revisit the step-like and Gaussian-like cases to provide explicit analytical expressions for the period perturbations that can be used when not all modes in a sequence of radial orders are observed, but an estimate of the asymptotic period spacing is still available.

Matching the wave solutions on each side of the glitch is relatively straightforward when the glitch can be assumed to be infinitely thin, for example when it is adequately modelled by a Dirac-δ function or a step function. However, the derivation becomes less accurate when the glitch has a non-negligible width. Matching across the glitch in this case requires an analytical representation of the eigenfunction inside the glitch, which, in turn, cannot be derived asymptotically because the scale of variation of the background there becomes comparable to the scale of the wave. Therefore, in the present work, we also explain how we performed additional tests to the expression provided earlier for the Gaussian-like glitch (Cunha et al. 2019) to quantify the impact of the assumptions that underlined its derivation.

We start by providing a general analytical expression for the period perturbations of pure g modes in Sect. 2. We then consider the case of a step-like glitch (Sect. 3), testing the perturbation to the periods against model data and verifying that the perturbation to the periods in the limit of a small amplitude glitch is identical to that derived with recourse to the variational principle, as expected. Next, we address the case of the Gaussian-like glitch, discussing the limits of the proposed periods’ perturbation when the glitch approaches the Dirac δ case and the case of a small glitch, and setting the accuracy limits of the expression based on artificial data produced to this effect. In Sect. 5 we discuss other cases, including the case of a buoyancy glitch described by a ramp function and the case of buoyancy glitches in stars exhibiting mixed modes. Finally, in Sect. 6 we draw the main conclusions from our work.

## 2. Perturbation to the periods

Internal gravity waves propagate in regions that are convectively stable with a phase speed that depends directly on the buoyancy frequency N. Asymptotically, at low degree (l) and high radial orders (n) the periods of gravity eigenmodes (hereafter g modes) are expected to be equally spaced with a period spacing given by (Tassoul 1980)

$$ \Delta P_{\text{as}} = \frac{2\pi^2}{\omega_g}, \qquad (1) $$

where, $\omega_g$ is the buoyancy extent of the g-mode cavity given by

$$ \omega_g = \int_{r_1}^{r_2} \frac{\text{LN}}{r} \text{dr}, \qquad (2) $$

$L = \sqrt{l(l+1)}$, r is the distance from the stellar centre, and $r_1$ and $r_2$ are the inner and outer turning points, respectively, of the g mode propagation cavity.

When a glitch is located inside the g-mode cavity, the phase of the wave is perturbed, which in turn perturbs the eigenvalue condition and shifts the periods from the constant spacing predicted asymptotically. Under the Cowling approximation and using the variable $\Psi = (r^3/g\rho\tilde{f})^{1/2}\delta p$, where $\delta p$ is the Lagrangian pressure perturbation, $\rho$ is the density, g is the gravitational acceleration, and $\tilde{f}$ is a function of frequency and of the equilibrium structure (the f-mode discriminant defined by Eq. (35) of Gough 2007), the wave equation resulting from the linear, adiabatic pulsation equations, for the case of a spherically symmetric equilibrium can be written in the standard form as

$$ \Psi'' + K^2 \Psi = 0. \qquad (3) $$

Here a prime represents a differentiation with respect to r and, given our interest in pure g modes, we shall approximate the radial wavenumber K by

$$ K^2 \approx -\frac{L^2}{r^2} \left(1 - \frac{N^2}{\omega^2}\right), \qquad (4) $$

with $\omega$ being the angular frequency of the mode.

Starting from Eq. (3) and following the asymptotic analysis by Gough et al. (1993), Cunha et al. (2019) showed that the perturbed eigenvalue condition in the presence of a buoyancy glitch takes the form,

$$ \sin\left(\int_{r_1}^{r_2} K dr + \frac{\pi}{2} + \Phi\right) = 0, \qquad (5) $$
where $\Phi$ is the frequency-dependent phase perturbation induced by the glitch.

From Eq. (5), it follows that,

$$ \int_{r_1}^{r_2} K(\omega)dr = \pi \left(n - \frac{1}{2}\right) - \Phi(\omega), \qquad (6) $$

where $n$ is an integer.

To derive the perturbation to the oscillation periods, with regards to a reference model with a buoyancy frequency $N_0$, we start by noticing that in the reference model the eigenvalue condition implies that,

$$ \int_{r_1}^{r_2} K_0(\omega_0)dr = \pi \left(n - \frac{1}{2}\right), \qquad (7) $$

where $\omega_0$ is the unperturbed eigenfrequency, and thus,

$$ \int_{r_1}^{r_2} K(\omega)dr = \int_{r_1}^{r_2} K_0(\omega_0)dr - \Phi(\omega). \qquad (8) $$

Except near the turning points, $K \approx LN/r\omega$ and $K_0 \approx LN_0/r\omega_0$. Therefore one can write $\int_{r_1}^{r_2} K(\omega)dr = (\int_{r_1}^{r_2} LN/r\omega dr + \alpha)$ and $\int_{r_1}^{r_2} K_0(\omega_0)dr = (\int_{r_1}^{r_2} LN_0/r\omega_0 dr + \alpha)$ where $\alpha = \delta + \tilde{\delta}$ is a phase that incorporates the effect of the approximation of the radial wavenumber near both turning points ($\delta$ and $\tilde{\delta}$ being the contributions from the outer and inner turning points, respectively). Notice that we have taken the turning points and $\alpha$ to be the same in the perturbed and unperturbed models. This is justified by the fact that the buoyancy frequency is unperturbed near the turning points (or else, the perturbation would not be a glitch, because there the wavenumber tends to zero and the glitch condition would not be satisfied). Thus, the turning points and $\alpha$ in the perturbed and unperturbed cases may differ only due to the change in the eigenfrequency, which in all cases considered is small (in relative terms), even when the local perturbations to $N$ inside the $g$-mode cavity are not.

Written in terms of the periods $P = 2\pi/\omega$, it then follows from Eq. (8) that the perturbation to the periods with regards to the reference model is,

$$ P = P_0 - P_0 \left( \int_{r_1}^{r_2} \delta N \frac{dr}{r} \right) \left( \int_{r_1}^{r_2} N \frac{dr}{r} \right)^{-1} - \left( \int_{r_1}^{r_2} \frac{LN}{2\pi} \frac{dr}{r} \right)^{-1} \Phi, \qquad (9) $$

where we introduced the perturbation to the buoyancy frequency with respect to a reference model, defined by $\delta N = N - N_0$. Notice that this perturbation depends on the choice of reference model, which can take different forms. An example of such a reference model is given in Appendix A for the case of a step-like glitch.

From Eq. (9) one can identify two contributions to the perturbed period $\delta P = P - P_0$: a smooth contribution expressed by the second term on the right hand side (rhs) of the equation, related to the change in the total integral of the buoyancy frequency within the $g$-mode cavity, and the contribution from the glitch-induced phase $\Phi$.

Equation (9) can also be written in terms of the asymptotic period spacing, $\Delta P_{as}$, namely,

$$ P = P_0 - P_0 \frac{\Delta P_{as}}{\pi} \left( \int_{r_1}^{r_2} \frac{L \delta N}{2\pi} \frac{dr}{r} \right) - \frac{\Delta P_{as}}{\pi} \Phi \equiv P_s - \frac{\Delta P_{as}}{\pi} \Phi, \qquad (10) $$

where we have introduced $P_s$ (on the rightmost side of the expression) representing the unperturbed periods (i.e. without the glitch effect) of a hypothetical model in which the integral of

$N/r$ within the $g$-mode cavity is the same as in the glitch model. Asymptotically, we can write $P_s = P_{s,min} + k\Delta P_{as}$, for a series of natural numbers $k$, where $P_{s,min}$ is the first of a series of equally spaced unperturbed periods. Rewriting Eq. (10), we then have,

$$ P = P_{s,min} + \Delta P_{as} \left( k - \frac{\Phi}{\pi} \right). \qquad (11) $$

Therefore, $\Phi/\pi$ is directly related to the deviation of the periods from the exact asymptotic spacing and its impact is seen as a modulation in a period échelle diagram.

As the reference model is not a priori univocally defined, we shall consider the period perturbations with respect to $P_s$ ($\delta P_s = P - P_s$), rather than the $\delta P$ defined above, unless otherwise stated. It is worth noting that when the asymptotic period spacing is the same in the glitch model and in the chosen reference model, $P_s$ and $P_0$ are also the same.

Finally, as the asymptotic period spacing depends on the mode degree, to fit modes of different degree simultaneously it is useful to rewrite the expression above in terms of the $l$-independent reduced period spacing $\Delta\Pi = L\Delta P_{as}$. Defining the reduced period $\Pi = LP$ one then finds that

$$ \Pi = \Pi_0 - \Pi_0 \frac{\Delta\Pi_{as}}{\pi} \left( \int_{r_1}^{r_2} \frac{\delta N}{2\pi} \frac{dr}{r} \right) - \frac{\Delta\Pi_{as}}{\pi} \Phi \equiv \Pi_s - \frac{\Delta\Pi_{as}}{\pi} \Phi, \qquad (12) $$

with $\Pi_s = LP_s$.

In what follows we shall consider the explicit form taken by the glitch phase, $\Phi$, for different representations of the glitch. To that end, we define the buoyancy radius

$$ \tilde{\omega}_g^r = \int_{r_1}^{r} \frac{LN}{r} dr \qquad (13) $$

and the buoyancy depth

$$ \omega_g^r = \int_r^{r_2} \frac{LN}{r} dr, \qquad (14) $$

and note that both these quantities are defined in terms of the buoyancy frequency $N$ in the star or model under consideration and not in terms of the buoyancy frequency $N_0$ of the reference model. This is of particular relevance in the case of finite-width glitches, such as a glitch represented by a Gaussian function. The location of glitches in the inner half of the $g$-mode cavity (i.e. for which $\tilde{\omega}_g^r/\omega_g < 0.5$) shall be expressed in terms of the buoyancy radius while the location of glitches in the outer half of the $g$-mode cavity shall be expressed in terms of the buoyancy depth.

### 3. Step-like glitch

Cunha et al. (2019) considered the case of a decreasing step-like glitch in the inner half of the $g$-mode cavity, defined by

$$ N = \begin{cases} N_{\text{in}} & \text{for } r < r^* \\ N_{\text{out}} & \text{for } r > r^* \end{cases}, \qquad (15) $$

with $N_{\text{in}} > N_{\text{out}}$, thus with $N$ varying by the positive amount $\Delta N = N_{\text{in}}|_{r \to r^*} - N_{\text{out}}|_{r \to r^*}$ at $r = r^*$ (not to be confused with the perturbation with respect to the reference model, $\delta N$). According to the authors (and keeping their notation), the glitch-induced phase for this case is given by,

$$ \Phi_{\text{st}} = \arccot \left[ \frac{2}{A_{\text{st}} \sin(2\tilde{\beta}_2)} - \cot \tilde{\beta}_2 \right], \qquad (16) $$
where the subscript “st” is used to indicate a step-like glitch. Here, $\tilde{\beta}_2 = \int_{r_1}^{r^*} Kdr + \pi/4 \approx \frac{\omega_g^*}{2\pi} P + \pi/4 + \tilde{\delta}$, and the superscript * indicates that the corresponding quantity is evaluated at $r = r^*$. The glitch is thus characterised by the relative step amplitude $A_{st} = [N_{in}/N_{out}]_{r^*} - 1$, and the buoyancy radius $\tilde{\omega}_g^*$ at the glitch location, with the expression including an additional fudge parameter $\tilde{\delta}$ accounting for the approximation of the integral made near the inner turning point. While Cunha et al. (2019) considered a model with a decreasing step-like glitch, the authors did not make any assumption about the sign of $\Delta N$ when deriving Eq. (16). Therefore, this equation is also valid for an increasing step-like glitch for which $\Delta N < 0$.

It should be noted that the expression for $\Phi_{st}$ is degenerate with respect to the transformation $A_{st} \rightarrow \hat{A}_{st}$ and $\tilde{\delta} \rightarrow \tilde{\delta} - \pi/2$, where $\hat{A}_{st} = [N_{out}/N_{in}]_{r^*} - 1$. Given that $A_{st}$ and $\hat{A}_{st}$ have opposite signs and are not identical in absolute value, care must be exerted in the interpretation of the retrieved amplitude. In the case of a decreasing step-like glitch with a fixed jump in $N$ at the discontinuity, the positive amplitude retrieved from the fitting will be larger than the absolute value of the negative solution. This is because the former should be interpreted as $A_{st}$ and the latter should be interpreted as $\hat{A}_{st}$ (the actual jump being the same, but expressed differently). The situation is reversed for an increasing step-like glitch. This difficulty can be avoided by setting a prior to the amplitude when fitting the data. By imposing that the amplitude must be positive the retrieved value is always interpreted as $A_{st}^{\pm} = [N_{+}/N_{-}]_{r^*} - 1$, where the subscripts + and – indicate the largest and the smallest of the two values of $N$ at the discontinuity.

Finally, while the expression above was derived for a glitch located in the inner half of the g-mode cavity, by symmetry of the mathematical problem considered, it is clear that the case of a decreasing step-like glitch in the inner cavity corresponds to the case of an increasing step-like glitch in the outer cavity, and the case of an increasing step-like glitch in the inner cavity corresponds to the case of a decreasing step-like glitch in the outer cavity. Thus, to infer the properties of a glitch in the outer g-mode cavity one can also use expression (16), making the correspondence $\tilde{\beta}_2 \rightarrow \beta_2$, where $\beta_2 = \int_{r^*}^{r_2} Kdr + \pi/4 \approx \frac{\omega_g^*}{2\pi} P + \pi/4 + \delta$.

Notice, however, that the phases $\tilde{\delta}$ and $\delta$ depend on the details of $K$ near the inner and outer turning points, respectively, and are not necessarily the same. Hence, despite the symmetry of the expression, the signatures of glitches located at equal values of $\omega_g^*$ and $\tilde{\omega}_g^*$ may differ.

### 3.1. Test on model data

Massive stars have convective cores that retreat as they evolve in the main sequence. The retreating core leaves behind a gradient in the hydrogen abundance that changes abruptly at the radius where the mixing region was once at its maximum. This abrupt change in the gradient of hydrogen abundance leads to a step-like discontinuity in the buoyancy frequency that is located inside the g-mode cavity, hence ideal to test our formulation (see, e.g. Fig. 1, left panels, of Cunha et al. 2019, for the chemical and buoyancy profiles in a massive star). To test the expression for the periods in the presence of a step-like glitch we, thus, fit Eq. (10) expressed in terms of the unperturbed periods $P_s$, to the periods computed for a model of a main-sequence, 6 $M_\odot$ star. In order to compare with the results obtained by Cunha et al. (2019), we use the model and

adiabatic pulsation periods computed in their work using the Aarhus STellar Evolution Code (ASTEC, Christensen-Dalsgaard 2008b) and the Aarhus adiabatic oscillation package (ADIPLS, Christensen-Dalsgaard 2008a), respectively.

The model data were fitted through a Markov Chain Monte Carlo method (MCMC) using the emcee python package, where the likelihood was assumed to be Gaussian, as stated in expression (17), where $\sigma$ represents the jitter parameter.

$$ \mathcal{L} = \left( \frac{1}{\sqrt{2\pi\sigma^2}} \right)^N \exp \left[ -\frac{1}{2} \sum_i^N \left( \frac{P_i - P_{\text{ADIPLS},i}}{\sigma} \right)^2 \right]. \quad (17) $$

As in previous works, we do not perturb the pulsation periods prior to performing the fit. Instead, we use the model periods as given and take $\sigma$ as a free parameter. Hence, the adequacy of the fit is reflected in the ratio of the inferred value of $\sigma$, to a characteristic value of the periods.

Prior to the MCMC, the likelihood was maximised using a Nelder-Mead minimiser method on $-\log(\mathcal{L})$. The resulting parameter space position was used to set the MCMC walkers’ initial position, adding to each a small (around 0.01% of each parameter’s value) random dislocation, allowing a better exploration of the parameter space near this region.

The construction of the fitted periods through Eq. (10) involves the resolution of a transcendental equation in the periods. This was achieved using the bisection method, iteratively for each period, with a margin of $10^{-8}$. The codomain of the arc-cotangent in Eq. (16) must be carefully selected in order to avoid discontinuities. For step function glitches the argument passes from $+\infty$ to $-\infty$, so the codomain was chosen to be $[-\pi/2, \pi/2]$. With the discontinuities avoided all together, the determination of each period comes from finding the root of a monotonous function, which is doable by setting the search region as $[P_{i-1}, P_{i-1} + 2\Delta P_{as}]$. The free parameters determined from the fit are $P_{s,min}$, corresponding to the first of the periods $P_s$, the asymptotic period spacing $\Delta P_{as}$, the jitter $\sigma$ and the glitch parameters, namely, the amplitude $A_{st}$, position $\tilde{\omega}_g^*$ and phase $\tilde{\delta}$.

We generated Markov Chains with 50 walkers and 9000 iterations, with a burn-in of 1000 iterations. From these we extracted the maximum probability parameters as well as the probability distribution median parameters and their respective 68% confidence interval. The priors on the parameters were uniform within the intervals provided in Table B.1 and the respective marginalised distributions for the parameters are shown in Fig. B.1.

Figure 1, left panel, shows the periods of the ASTEC main-sequence model in the form of an échelle diagram, where the model periods (red symbols) are plotted against the residuals defined as follows:

$$ \begin{array}{l} \text{res} = (P - P_{\text{s,min}}) \mod \Delta P_{\text{as}}; \\ \text{if } \text{res} > \Delta P_{\text{as}}/2 \text{ then } \text{res} = \text{res} - \Delta P_{\text{as}}. \end{array} \quad (18) $$

The period perturbations $\delta P_s = -\frac{\Delta P_{as}}{\pi} \Phi_{st}$ derived from fitting Eq. (10) to the model periods, with the glitch phase defined by Eq. (16), are also shown (black line). The parameters inferred from the fit are given in Table 1. Comparison with the results found by Cunha et al. (2019) from fitting the periods spacings shows agreement within $1-\sigma$ on the inferred glitch amplitude, glitch position, and period spacings. The phases also show a reasonable agreement ($\sim 1.5-\sigma$).
<table><caption>**Table 1.** Parameters derived from the fit of the analytical expression for the step-like glitch (Eqs. (10) and (16)) to the periods derived from ADIPLS for the main-sequence model.</caption><thead><tr><th></th><th>P<sub>s,min</sub></th><th>ΔP<sub>as</sub> (s)</th><th>A<sub>st</sub></th><th>ω̄<sub>g</sub><sup>*</sup> (10<sup>-6</sup> rad s<sup>-1</sup>)</th><th>δ̄</th><th>Reference</th></tr></thead><tbody><tr><td>Periods' fit</td><td>50 315<sup>+176</sup><sub>-174</sub></td><td>8485<sup>+12</sup><sub>-12</sub></td><td>4.71<sup>+0.90</sup><sub>-0.72</sub></td><td>348.0<sup>+2.8</sup><sub>-2.8</sub></td><td>0.713<sup>+0.076</sup><sub>-0.073</sub></td><td>This work</td></tr><tr><td>Period spacings' fit</td><td></td><td>8472<sup>+50</sup><sub>-50</sub></td><td>4.74<sup>+0.44</sup><sub>-0.39</sub></td><td>351.61<sup>+0.73</sup><sub>-0.72</sub></td><td>0.602<sup>+0.019</sup><sub>-0.019</sub></td><td>Cunha et al. (2019)</td></tr><tr><td>Estimated</td><td>—</td><td>—</td><td>5.3</td><td>349</td><td>—</td><td>Cunha et al. (2019)</td></tr></tbody></table>

Notes. The values shown correspond to the median of the distributions and the 68% confidence intervals. For comparison, the values of the glitch parameters and asymptotic period spacing inferred by fitting the period spacings, as well as the glitch parameters estimated directly from the ASTEC buoyancy frequency profile are also shown.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Period échelle diagrams representing the pulsations in the ASTEC models (red asteriscs) and the respective best fits derived from Eq. (10) (black lines). Left panel: main-sequence model and glitch phase given in Eq. (16). Right panel: RGB model and glitch phase given in Eq. (22). The vertical dashed-dotted black line marks res=0.</figcaption></figure>

## 3.2. Limit of small glitch

In the case of a step-like glitch with amplitude much smaller than 1, the expression for the periods becomes,

$$P = P_0 - P_0 \frac{\Delta P_{as}}{\pi} \left( \int_{r_1}^{r_2} \frac{L \delta N}{2\pi} \frac{dr}{r} \right) + \frac{\Delta P_{as}}{2\pi} A_{st} \sin(2\beta_2), \quad (19)$$

In this small glitch limit $A_{st} = [N_{in}/N_{out}]_{r^*} - 1 \approx -([N_{out}/N_{in}]_{r^*} - 1) \approx [\Delta N/N_0]_{r^*}$.

Under these conditions, the expression for the period perturbation can also be derived by making use of the variational principle (e.g. Gough et al. 1993). The derivation is presented in Appendix A<fnref n="1" />, where our choice of reference model was made such that the smooth contribution to the period perturbation (second term on the rhs of Eq. (19)) varies with $(\delta N/N)^2$, becoming negligible for small enough perturbations. Comparison of

Eqs. (A.12) and (19), confirms that the two derivations provide the same result in this limit, as expected.

## 4. Gaussian-like glitch

In the case of the Gaussian-like glitch, Cunha et al. (2019) modelled the glitch in N, taking

$$\frac{\Delta N}{N_0} \approx \frac{A_G}{\sqrt{2\pi}\Delta_g} \exp\left(-\frac{(\omega_g^r - \omega_g^*)^2}{2\Delta_g^2}\right). \quad (20)$$

Given the inherent difficulty in modelling the eigenfunction through the perturbation (cf. discussion in Sect. 1), it is important to recall that the analysis was performed under the rough assumption that inside the glitch the eigenfunction has the form

$$\Psi \propto K_0^{-1/2} \sin\left(\int K dr + \frac{\pi}{4}\right), \quad (21)$$

and that an ad hoc adjustment was made to the exponential function defining the decay of the glitch signature, so as to recover the decay found when using the variational principle to treat the small glitch limit. The glitch-induced phase proposed by the authors under the above conditions is given by

$$\Phi_G = \arccot \left[ \frac{1}{A_G f_{\omega}^{\Delta_g} \sin^2 \beta_2} - \cot \beta_2 \right], \quad (22)$$

where, $f_{\omega}^{\Delta_g} = \omega^{-1} \exp(-2\Delta_g^2 \omega^{-2})$.

## 4.1. Tests on model data

To test the expression for the periods in the presence of a Gaussian-like glitch and compare with the fits to the period spacings performed by Cunha et al. (2019), we follow again their example and fit Eq. (10) to the pure g-mode periods computed by the authors for a 1 $M_\odot$ red giant branch (RGB) model. The model was computed with the evolution code ASTEC (Christensen-Dalsgaard 2008b) and the pure g-mode pulsations were computed by artificially disregarding the p-mode cavity with the ASTER code (see Cunha et al. 2015, 2019, for details). Here, the glitch (illustrated in their Fig. 1, right panel) results from the strong chemical gradient that is built at the first dredged-up and that crosses the g-mode cavity during the luminosity bump.

The same procedure as the one described in Sect. 3.1 was used. For a Gaussian-like glitch there is an additional free parameter, as we must fit as well the width $\Delta_g$. The argument of the

<footnote n="1">¹ This limit was also considered in Miglio et al. (2008). However, the authors were only concerned with the periodic component of the perturbation and the phase of the periodic component they present differs from the one derived here by $\pi/2$.</footnote>
arc-cotangent for Gaussian glitches crosses 0, instead of jumping from $+\infty$ to $-\infty$. Thus the codomain was chosen to be $[0, \pi]$ to avoid a discontinuity in this region.

The stellar model used to test the Gaussian-like glitch signature has a denser period spectra than the main-sequence model used to test the step-like glitch signature. As a consequence, the data set to be fitted was larger in the Gaussian-like glitch case and not as many iterations were needed. We ran the MCMC for 4000 iterations with a burn-in of 1000, since the distributions took longer to converge to their stationary state. As before, 50 walkers were used to explore the parameter space. The priors on the parameters were uniform within the intervals provided in Table B.1 and the respective marginalised distributions for the parameters are shown in Fig. B.2.

The right panel of Fig. 1 shows the pure g-mode periods of the ASTEC RGB model in the form of and échelle diagram, where the model periods (red symbols) are plotted against the residuals computed as in Sect. 3.1. The period perturbations derived from the fit of Eqs. (10) and (22) to the model periods are also shown (black line). Unlike in the case of the step-like glitch, here the perturbation is generally negative (in the case of the fit it is always negative and in the case of the model data it takes small positive values with a maximum of $\sim 3 \times 10^{-5}$ h only at very few points). The reason is that $\Phi_G$ includes a smooth, frequency-dependent component (more easily identified in the expression for the small glitch limit given in Eq. (28)) that contributes negatively to the period perturbation $\delta P_s$.

The parameters inferred from the fit are given in Table 2. Comparison with the results found by Cunha et al. (2019) from fitting the period spacings shows agreement within $1-\sigma$ on the inferred glitch amplitude, glitch width, and period spacings. The phases and glitch positions also show a reasonable agreement ($\sim 2-\sigma$). Nevertheless, in this case a large difference is seen when comparing the glitch properties inferred from the fittings of the analytical expression and from the model buoyancy frequency (with the amplitude from the fit being more than 1.5 times larger than that derived from the buoyancy frequency). This discrepancy, also found by Cunha et al. (2019) when fitting the period spacings, will be discussed further in Sect. 4.4.

## 4.2. Dirac $\delta$ limit

To verify that the phase for the Gaussian-like glitch reproduces the expected form in the limit of a Dirac $\delta$, we consider Eq. (22) in that limit and compare with the phase derived by Cunha et al. (2015). Recalling that

$$ \lim_{\Delta_g \to 0^+} \frac{1}{\sqrt{2\pi}\Delta_g} \exp\left(-\frac{(\omega_g^r - \omega_g^\star)^2}{2\Delta_g^2}\right) = \delta(\omega_g^r - \omega_g^\star), \quad (23) $$

we find that the glitch-induced phase tends to

$$ \Phi_{G,\text{lim}} = \arccot \left[ \frac{1}{A_G \omega^{-1} \sin^2 \beta_2} - \cot \beta_2 \right], \quad (24) $$

in the limit when the glitch tends to a Dirac $\delta$ in the variable $\omega_g^r$.

In Cunha et al. (2015), the authors defined the glitch in $N^2(r)$ as,

$$ \frac{\Delta N^2}{N_0^2} \approx A\delta(r - r^*). \quad (25) $$

By integrating the wave Eq. (3) once across the glitch, the authors found the discontinuity in the radial derivative of the

eigenfunction to be given by (see their Eq. (11))

$$ \begin{aligned} [\Psi'_{\text{out}} - \Psi'_{\text{in}}]_{r^*} &= - \lim_{\Delta r \to 0} \int_{r^* - \Delta r}^{r^* + \Delta r} \Delta K^2 \Psi dr \\ &= - \lim_{\Delta r \to 0} \int_{r^* - \Delta r}^{r^* + \Delta r} K_0^2 A \delta(r - r^*) \Psi dr. \end{aligned} \quad (26) $$

Considering the same discontinuity in the case of the Gaussian-like glitch (Cunha et al. 2019, see their Appendix A1) and taking the Dirac $\delta$ limit, one has, in terms of the variable $\omega_g^r$,

$$ \begin{aligned} [\Psi'_{\text{out}} - \Psi'_{\text{in}}]_{r^*} &= - \lim_{\Delta \omega_g^* \to 0} \int_{\omega_g^* - \Delta \omega_g^*}^{\omega_g^* + \Delta \omega_g^*} \omega^{-1} \Delta K \Psi d\omega_g^r \\ &= - \lim_{\Delta \omega_g^* \to 0} \int_{\omega_g^* - \Delta \omega_g^*}^{\omega_g^* + \Delta \omega_g^*} \omega^{-1} K_0 A_G \delta(\omega_g^r - \omega_g^{r*}) \Psi d\omega_g^r, \end{aligned} \quad (27) $$

where we have used Eq. (23) to convert from the Gaussian perturbation to the corresponding Dirac $\delta$ limit. We thus find $A_G = (LN_0^*/r^*)A$ in the Dirac $\delta$ limit. Substituting in Eq. (24), we confirm that the Gaussian glitch-induced phase is the same as that derived by Cunha et al. (2015) (cf. their Eq. (16)) in the Dirac $\delta$ limit.

## 4.3. Limit of small glitch

When $\Delta N/N_0 \ll 1$ everywhere, $A_G/\omega \ll 1$ (since $\Delta_g \sim \omega$ for a glitch to exist). In that case,

$$ \Phi_G \sim \arctan \left[ A_G f_{\omega}^{\Delta_g} \sin^2 \beta_2 \right] \sim \frac{1}{2} A_G f_{\omega}^{\Delta_g} \left[ 1 - \cos (2\beta_2) \right], \quad (28) $$

Defining the reference model as that with an otherwise equal buoyancy frequency, without the Gaussian perturbation, we have that $\delta N/N_0 = \Delta N/N_0$. Accordingly, the period perturbations are derived from Eq. (10) to be,

$$ P = P_0 - P_0 \frac{\Delta P_{\text{as}}}{2\pi^2} A_G - \frac{\Delta P_{\text{as}}}{2\pi} A_G f_{\omega}^{\Delta_g} [1 - \cos (2\beta_2)]. \quad (29) $$

Under this limit of a small perturbation to the buoyancy frequency, the perturbation to the periods induced by a Gaussian-like glitch can be derived with recourse to the variational principle. The derivation is presented in Appendix A with the period perturbations given by Eq. (A.14). Comparison with Eq. (29) shows that the sinusoidal part of the glitch-induced period perturbation is a factor of two smaller in the case derived by matching the eigenfunctions through the approach followed by Cunha et al. (2019). Moreover, the smooth component resulting from this derivation has also an additional term compared to the variational approach, which is generally not negligible. In practice, the difference in the smooth component will have no impact when inferring the glitch properties by fitting the periods or period spacings (at most, it will introduce small differences in the inferred unperturbed periods that are of no physical interest since they refer to a hypothetical unperturbed model). However, the factor of two in the sinusoidal component will be translated into a factor of two in the inferred amplitude of the glitch, which will be two times larger when fitting the expression derived through the approach followed by Cunha et al. (2019), compared with fitting with the expression derived from the variational principle. Changing $\Phi_G$ such that the perturbation to the periods satisfies that derived through the variational principle in the limit of a
<table><caption>**Table 2.** Parameters derived from the fit of the analytical expression for the Gaussian-like glitch (Eqs. (10) and (22)) to the period spacing derived from ASTER for the RGB model.</caption><thead><tr><th></th><th>P<sub>s,min</sub></th><th>ΔP<sub>as</sub> (s)</th><th>A<sub>G</sub> (10<sup>-6</sup> rad/s)</th><th>ω<sub>g</sub><sup>*</sup> (10<sup>-6</sup> rad/s)</th><th>Δ<sub>g</sub> (10<sup>-6</sup> rad/s)</th><th>δ</th><th>Reference</th></tr></thead><tbody><tr><td>Periods' fit</td><td>14 967.183<sup>+0.076</sup><sub>-0.074</sub></td><td>67.53443<sup>+0.00034</sup><sub>-0.00035</sub></td><td>589.1<sup>+4.4</sup><sub>-4.3</sub></td><td>1730.6<sup>+1.6</sup><sub>-1.6</sub></td><td>157.31<sup>+0.55</sup><sub>-0.55</sub></td><td>-0.7936<sup>+0.0069</sup><sub>-0.0069</sub></td><td>This work</td></tr><tr><td>Period spacings' fit</td><td>—</td><td>67.534<sup>+0.005</sup><sub>-0.005</sub></td><td>607<sup>+27</sup><sub>-25</sub></td><td>1747.3<sup>+7.6</sup><sub>-7.7</sub></td><td>158.5<sup>+3.4</sup><sub>-3.4</sub></td><td>-0.872<sup>+0.034</sup><sub>-0.034</sub></td><td>Cunha et al. (2019)</td></tr><tr><td>Estimated</td><td>—</td><td>—</td><td>380</td><td>1632</td><td>156</td><td>—</td><td>Cunha et al. (2019)</td></tr></tbody></table>

**Notes.** The values shown correspond to the median of the distributions and the 68% confidence intervals. For comparison, the values of the glitch parameters and asymptotic period spacing inferred by fitting the period spacings, as well as the glitch parameters estimated directly from the ASTEC buoyancy frequency profile, are also shown.

small glitch is not an option because we verified that the expression for $\Phi_G$ satisfies the correct limit when the glitch approaches a Dirac $\delta$ and the inherent difficulty of fitting the eigenfunctions at the perturbation disappears (Sect. 4.2). Instead, in Sect. 4.4 we explore the accuracy of the analytical expression for $\Phi_G$ in intermediate cases, simulating glitches of different amplitudes and widths, and estimating the error incurred on the inferred glitch parameters.

## 4.4. Tests to the accuracy of the Gaussian-like glitch inferences

The results from Sect. 4.3 illustrate well the anticipated difficulty in deriving an expression for the glitch-induced signature that is valid across the parameter space that one would like to explore, in the case of a Gaussian-like glitch. It is thus important to test the accuracy of the proposed expression on control data before using it to fit real data. To that end, we simulated a series of Gaussian-like glitches, starting from the buoyancy frequency of our $1M_\odot$ red giant model. Specifically, we started by building a glitchless reference model by either removing or smoothing the features in $N$ that produce visible period spacing variations on scales smaller than the frequency range analysed (i.e. [25,67] µHz). Two features were identified: (1) the glitch in $N$ associated to the steep chemical gradient left by the first dredge-up, which was removed by fitting a second order polynomial across the glitch region; (2) a series of significant short-scale variations in the second derivative of $N$ (of numerical origin) taking place in the H-burning shell, which were suppressed by applying a boxcar average to $N$ (with a width of ~1/50 of the shell) in the region of the H-burning shell. The buoyancy frequency of the original ASTEC model (dashed black line) around the glitch is compared with that of the glitchless reference (black dotted line) in Fig. 2.

Next we artificially added one Gaussian glitch at a time to the glitchless reference model, to generate a set of six models, each with a single glitch. The parameters of the added glitches were first defined based on the buoyancy depth of the reference model. As $N$ is modified by the addition of the glitch, we then recomputed the buoyancy depth based on the new $N$ and fitted a Gaussian function to the glitch to extract the true glitch parameters that are to be compared with the values inferred from fitting the analytical expression. The parameters of the six artificial glitches were chosen to explore different regimes, namely: (1) three glitches with similar widths and different amplitudes were simulated to investigate the impact of increasing amplitude; (2) two glitches with similar amplitude and different small widths were simulated to verify the impact of approaching the Dirac $\delta$ limit; (3) one glitch with a small amplitude was also simulated to test the results when approaching the small glitch limit. This series of glitches is illustrated in Fig. 3 and the respective properties are provided in Table 3.

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Buoyancy frequency for the original ASTEC model (dashed black line), the glitchless reference model (dotted black line), and model 5, built by adding to the glitchless reference model a glitch with properties similar to that of the original ASTEC model.</figcaption></figure>

<table><caption>**Table 3.** Properties of the simulated glitches used in Sect. 4.4.</caption><thead><tr><th>Model ID</th><th>A<sub>G</sub> (10<sup>-6</sup> rad/s)</th><th>ω<sub>g</sub><sup>*</sup> (10<sup>-6</sup> rad/s)</th><th>Δ<sub>g</sub></th><th>Comment</th></tr></thead><tbody><tr><td>1</td><td>502.2</td><td>1570.1</td><td>15.5</td><td>Dirac-like</td></tr><tr><td>2</td><td>493.9</td><td>1603.7</td><td>43.6</td><td></td></tr><tr><td>3</td><td>1920.7</td><td>1752.7</td><td>154.8</td><td>Largest amplitude</td></tr><tr><td>4</td><td>837.6</td><td>1700.4</td><td>154.8</td><td></td></tr><tr><td>5</td><td>355.9</td><td>1658.1</td><td>147.1</td><td>Similar to original</td></tr><tr><td>6</td><td>43.0</td><td>1565.0</td><td>46.9</td><td>Small</td></tr></tbody></table>

We note that one of these (model 5) has properties similar to those of the original ASTEC model and is shown in red in Fig. 2 and all panels of Fig. 3, for comparison.

The pure g-mode periods of the simulated glitch models were computed with the code ASTER and the respective period spacings were fitted with the analytical expression proposed by Cunha et al. (2019) (their Eq. (15)) following the procedure described in that paper. In the case of the smallest glitch (model 6) the fit required adding a smooth component to the analytical expression describing the period spacings, which we modelled as a linear function, $S_m = a_0 + a_1\omega$, where $a_0$ and $a_1$ are constants. We thus added the smooth component to the fit of the period spacings of all simulated glitch models for consistency, although no significant impact was found in any of the other cases.

The best fits to the period spacings for all six simulated glitch models are shown in Fig. 4, with the residuals shown in the
<figure><img src="image_4.png" /><figcaption>**Fig. 3.** Buoyancy frequency for the glitch-simulated models near the glitch position. In all panels, the continuous red line shows the case of model 5, corresponding to a glitch with properties similar to the original ASTEC model. Additionally, the black lines are as follows. Top panel: models 1 (dotted line) and 2 (dashed line). Middle panel: models 3 (dotted line) and 4 (dashed line). Bottom panel: model 6.</figcaption></figure>

bottom part of each panel. Comparison of the model period spacings (in black) with the best fits (in red) shows that the analytical expression proposed by Cunha et al. (2019) (their Eq. (15)) for the Gaussian-like glitch signature reproduces well the period spacings computed with ASTER in all cases (with all deviations

<figure><img src="image_5.png" /><figcaption>**Fig. 4.** Period spacings from ASTER for the simulated Gaussian-like glitches listed in Table 3 (black line and plus symbols) and respective best analytical-model fits (dashed red line). The residuals (ASTER – best fit) are also shown for each case. Top: models 1 and 2. Middle: models 3, 4 and 5. Bottom: model 6. The fits in red included a linear smooth component. The dashed blue line in the bottom panel shows the fit without the inclusion of a smooth component. For all other models the fits with and without the inclusion of the smooth component would be indistinguishable in these figures.</figcaption></figure>

smaller than 0.3%). Inspection of the blue curve in the bottom panel also shows that for the smallest glitch (Model ID 6 in Table 3) a smooth component needs to be added to the analytical
expression in order to achieve a good fit. With the addition of the smooth component, the fit is indeed improved significantly, as seen by the model shown in red in the same panel.

In the top panel of Fig. 4 we can also see how the signature of the glitch changes as the glitch becomes narrow. The two glitch models shown correspond to the buoyancy frequency profiles in black seen in the top panel of Fig. 3. As we approach the Dirac δ limit we have seen that the glitch signature becomes independent of the glitch width (cf. Eq. (24)). This is reflected in the results seen in the top panel of Fig. 4, as the glitch signatures for the two cases are almost indistinguishable (there are two black and two red lines plotted in this panel). Notice that the residuals between the model data (in black) and the fits (in red) for the two cases, also shown in the bottom part of the top panel, are also hardly distinguishable.

Likewise, we fitted the ASTER periods for the six simulated models with Eq. (10), using the glitch phase defined by Eq. (22), adding a second order smooth component to mimic the impact of the first order smooth component added to the analytical expression for the period spacings. Figure 5 shows the ratios between the inferred and true glitch properties both for the case of the fit to the period spacings and for case of the fit to the periods.

Inspection of the inferred glitch parameters show that these are not accurate, in the sense that the error bars associated with the inferences are small compared to the distance to the true values of the glitch properties. Thus, while the proposed analytical expressions for the signature on the periods and period spacings of the Gaussian-like glitch reproduce well the model data, they produce systematic errors in the inferred glitch properties. This was to be expected given the difficulties associated with the derivation of the analytical expression in this case (cf. Sect. 4). Nevertheless, the tests with artificial glitch models performed here allow us to understand the extent of the systematic errors so that these can be considered in applications to real data. According to the results, the parameter that is most affected, namely the amplitude of the glitch, can still be recovered within a factor of two for all cases tested. In fact, we verify that the maximum error of a factor of two occurs for the smallest amplitude glitch, as already anticipated through the inspection of that limit in Sect. 4.3. On the other hand, we see that the inferred amplitude becomes closer to the true value when the glitch becomes narrower, as expected from the Dirac δ limit discussed in Sect. 4.2. Regarding the glitch width, the largest errors occur for the narrower glitch (model ID 1 in Table 3), where the glitch-induced signature becomes less sensitive on this parameter. For this case we notice also a significant difference in the width inferences made by fitting the periods and the period spacings, and an increase in the error bars, compared to those obtained for the other glitch models. Finally, we see that the position of the glitch is determined within 10% of the true value in all cases considered.

## 5. Mixed modes

For completeness, in this section we discuss the expression for the frequency perturbations resulting from the impact of buoyancy glitches on mixed modes. The perturbation to the mixed-mode period spacings induced by a buoyancy glitch was first considered for the case of a glitch represented by a Dirac-δ function (Cunha et al. 2015) and later for a Gaussian-like glitch (Cunha et al. 2019). Following on these works, Vrard et al. (2022) provided an expression for the frequency perturbation of

dipole modes, namely,

$$v = v_{a,n} + \frac{\Delta v}{\pi} \arctan \left\{ q \tan \left[ \pi \left( \frac{1}{v \Delta P_{\text{as}}} - \epsilon_g \right) + \Phi \right] \right\}, \quad (30)$$

where $v_{a,n}$ represents the frequency of the pure acoustic dipole mode of (pressure) radial order $n$ that would exist in the absent of mode coupling, $\Delta v$ is the large frequency separation, $q$ is the coupling factor and $\epsilon_g$ is the gravity phase offset. This expression assumes that the integral of $N/r$ within the g-mode cavity is the same in the glitch and glitchless (reference) models. The impact of the glitch is incorporated in glitch phase $\Phi$, as before.

Explicit forms for $\Phi$ were derived by Cunha et al. (2015) and Cunha et al. (2019) for the Dirac-δ and Gaussian-like glitch, respectively. In both cases the authors assumed that the glitch was located in the outer half of the g-mode cavity. However, from the point of view of the solutions within the g-mode cavity, we can think of this case as being similar to the one of pure g modes, with the exception that the boundary conditions applied beyond the two turning points are no longer the same, as a result of the coupling outwardly from the cavity. In other words, the presence of the p-mode cavity outwards from the g-mode cavity breaks the symmetry of the problem with respect to the solution inside the g-mode cavity. It is thus worth considering how the glitch phase is modified when considering a glitch in the inner half of the g-mode cavity. That analysis is presented in Appendix C.

In all cases the functional form of $\Phi$ for mixed modes is found to be unchanged with respect to that derived in the analysis for the pure g modes, that is, it is given by Eqs. (16), (22), and (24), for the step-like, Gaussian-like, and Dirac-δ glitch, respectively. However, while the definition of $\tilde{\beta}_2$, used in the case of a glitch in the inner half of the g-mode cavity, remains the same as in the pure g-mode case, the definition of $\tilde{\beta}_2$ used in the case of a glitch in the outer half of the g-mode cavity differs from that derived in the pure g-mode case, as found in the previous works (Cunha et al. 2015, 2019). In particular, when employing any of the expressions for the phase $\Phi$ for mixed modes with a glitch in the outer half of the g-mode cavity, one must make the substitution $\tilde{\beta}_2 \rightarrow \tilde{\beta}_{2,\phi} \approx \frac{\omega_g^*}{2\pi} P + \pi/4 + \delta + \phi$, where $\phi$ is the coupling phase defined by

$$\phi \approx \arctan \left[ \frac{q}{\tan \left[ \pi (\nu - v_{a,n}) / \Delta v \right]} \right]. \quad (31)$$

As a result of the inclusion (exclusion) of $\phi$ in the arguments of the sinusoidal functions entering the definition of $\Phi$ in the case of glitches in the outer (inner) half of the g-mode cavity, different glitch signatures on the frequencies of mixed modes are expected depending on which case is considered. A thorough discussion on this symmetry breaking will be presented in a separate work.

Finally, we emphasise also the non-additive nature of the effects of the glitch and coupling on the frequencies, as already discussed in Cunha et al. (2019) (their Sect. 2). This requires that the two effects are considered simultaneously, by fitting with expression (30). While streching of the periods can be performed (Mosser et al. 2015; Ong & Gehan 2023), caution must be exerted on the interpretation of the results from that streching, particularly if the frequencies are observed only near the frequency of maximum coupling.

Fits of expression (30) to Kepler data on a sample of helium core-burning stars with a glitch located in the inner half of the g-mode cavity have recently been presented by Vrard et al. (2022), enabling the first characterisation of core glitches in these stars.
<figure><img src="image_6.png" /><figcaption>**Fig. 5.** Ratios between the inferred and true glitch parameters. Buoyancy radius (left), glitch width (middle), glitch amplitude (right). A comparison is shown of the values inferred from the fits to the period spacings (black) and to the periods (red). Note that the symbols have been displaced horizontally for a better visualisation. The horizontal dashed-dotted black line represents a ratio equal to 1.</figcaption></figure>

## 6. Conclusions

In this work we provided and tested on model data analytical expressions for the perturbations induced by a glitch located in the *g*-mode cavity of a star on pure *g*-mode periods and mixed-mode frequencies. This complements the work published previously on the period-spacings perturbations (Cunha et al. 2015, 2019) and will be particularly useful when fitting data for which the observed periods are not sequential in radial order (where the computation of the period spacings is not accessible for all radial orders, but an estimate of the asymptotic period spacing is still available).

Using model data, we have also tested the accuracy of the analytical expression proposed for the seismic signature of Gaussian-like glitches, where drastic approximations had to be made in the derivation due to the finite width of the glitch. We found that the analytical expression for the periods and period-spacings perturbations becomes insensitive to the glitch width when the glitch approached the Dirac-δ limit. In that case, the recovery of the glitch width becomes less accurate. Nevertheless, for all cases studied here, we found that the parameter that is most affect, namely the glitch amplitude, can still be recovered from the fitting within a factor of two.

Finally, comparing the glitch-induced phases for step-like and Gaussian-like glitches, we see that glitch signatures have different dependencies on period (see Fig. 1), according to their shapes. This introduces an additional uncertainty in the interpretation of the glitch amplitude (and width), particularly when the range of observed periods does not cover a significant number of cycles of the glitch signature. Therefore, we are forced to conclude that the glitch position is generally the most robust of the inferred glitch parameters, similar to what is found in studies of acoustic glitches (e.g. Mazumdar et al. 2014).

*Acknowledgements.* The authors would like to thank the anonymous referee for the interesting discussion and suggestions made during the refereeing process. This work has been supported by Fundação para a Ciência e Tecnologia FCT-MCTES, Portugal, through national funds by these grants UIDB/04434/2020 (DOI: 10.54499/UIDB/04434/2020), UIDP/04434/2020.FCT (DOI: 10.54499/UIDP/04434/2020) and 2022.03993.PTDC (DOI:10.54499/2022.03993.PTDC). MC is funded by FCT-MCTES by the contract with reference CEECIND/02619/2017.

## References

* Aerts, C., Christensen-Dalsgaard, J., & Kurtz, D. W. 2010, *Asteroseismology* (Springer)

* Audard, N., & Provost, J. 1994, A&A, 282, 73

* Baglin, A., Auvergne, M., Barge, P., et al. 2006, ESA Spec. Publ., 1306, 33

* Ballot, J., Turck-Chièze, S., & García, R. A. 2004, A&A, 423, 1051

* Baran, A. S., Reed, M. D., Østensen, R. H., Telting, J. H., & Jeffery, C. S. 2017, A&A, 597, A95

* Basu, S. 1997, MNRAS, 288, 572

* Basu, S., Antia, H. M., & Narasimha, D. 1994, MNRAS, 267, 209

* Basu, S., Mazumdar, A., Antia, H. M., & Demarque, P. 2004, MNRAS, 350, 277

* Benvenuto, O. G., Córsico, A. H., Althaus, L. G., & Serenelli, A. M. 2002, MNRAS, 335, 480

* Borucki, W. J., Koch, D., Basri, G., et al. 2010, Science, 327, 977

* Brassard, P., Fontaine, G., Wesemael, F., & Hansen, C. J. 1992, ApJS, 80, 369

* Broomhall, A.-M., Miglio, A., Montalbán, J., et al. 2014, MNRAS, 440, 1828

* Charpinet, S., Fontaine, G., Brassard, P., & Dorman, B. 2000, ApJS, 131, 223

* Charpinet, S., Fontaine, G., Brassard, P., & Dorman, B. 2002, ApJS, 139, 487

* Christensen-Dalsgaard, J. 2008a, Ap&SS, 316, 113

* Christensen-Dalsgaard, J. 2008b, Ap&SS, 316, 13

* Christensen-Dalsgaard, J. 2012, ASP Conf. Ser., 462, 503

* Christensen-Dalsgaard, J., Monteiro, M. J. P. F. G., & Thompson, M. J. 1995, MNRAS, 276, 283

* Christensen-Dalsgaard, J., Monteiro, M. J. P. F. G., Rempel, M., & Thompson, M. J. 2011, MNRAS, 414, 1158

* Corsaro, E., De Ridder, J., & García, R. A. 2015, A&A, 578, A76

* Córsico, A. H., Althaus, L. G., Benvenuto, O. G., & Serenelli, A. M. 2002, A&A, 387, 531

* Cunha, M. S. 2018, in *Asteroseismology and Exoplanets: Listening to the Stars* and *Searching for New Worlds*, eds. T. L. Campante, N. C. Santos, & M. J. P. F. G. Monteiro, Astrophys. Space Sci. Proc., 49, 27

* Cunha, M. S. 2020, in *Dynamics of the Sun and Stars: Honoring the Life and Work of Michael J. Thompson*, eds. M. J. P. F. G. Monteiro, R. A. García, J. Christensen-Dalsgaard, & S. W. McIntosh, Astrophys. Space Sci. Proc., 57, 185

* Cunha, M. S., & Brandão, I. M. 2011, A&A, 529, A10

* Cunha, M. S., & Metcalfe, T. S. 2007, ApJ, 666, 413

* Cunha, M. S., Aerts, C., Christensen-Dalsgaard, J., et al. 2007, A&Arv, 14, 217

* Cunha, M. S., Stello, D., Avelino, P. P., Christensen-Dalsgaard, J., & Townsend, R. H. D. 2015, ApJ, 805, 127

* Cunha, M. S., Avelino, P. P., Christensen-Dalsgaard, J., et al. 2019, MNRAS, 490, 909

* Deal, M., Goupil, M. J., Cunha, M. S., et al. 2023, A&A, 673, A49

* Degroote, P., Aerts, C., Baglin, A., et al. 2010, Nature, 464, 259

* Dréau, G., Cunha, M. S., Vrard, M., & Avelino, P. P. 2020, MNRAS, 497, 1008

* Farnir, M., Dupret, M. A., Salmon, S. J. A. J., Noels, A., & Buldgen, G. 2019, A&A, 622, A98

* Ghasemi, H., Moravveji, E., Aerts, C., Safari, H., & Vučković, M. 2017, MNRAS, 465, 1518

* Gilliland, R. L., Brown, T. M., Christensen-Dalsgaard, J., et al. 2010, PASP, 122, 131

* Gough, D. O. 1990, in *Progress of Seismology of the Sun and Stars*, eds. Y. Osaki, & H. Shibahashi (Berlin: Springer Verlag), Lecture Notes in Physics, 367, 283

* Gough, D. O. 1993, in *Astrophysical Fluid Dynamics - Les Houches*, eds. J. P. Zahn, & J. Zinn-Justin, 399

* Gough, D. O. 2007, Astron. Nachr., 328, 273

* Gough, D. O., & Thompson, M. J. 1988, in *Advances in Helio- and Asteroseismology*, eds. J. Christensen-Dalsgaard, & S. Frandsen, IAU Symp., 123, 155
Hatta, Y. 2023, ApJ, 950, 165

Hill, H. A., & Rosenwald, R. D. 1986, Ap&SS, 126, 335

Houdek, G., & Gough, D. O. 2007, MNRAS, 375, 861

Jiang, C., Cunha, M., Christensen-Dalsgaard, J., Zhang, Q. S., & Gizon, L. 2022, MNRAS, 515, 3853

Kurtz, D. W., Saio, H., Takata, M., et al. 2014, MNRAS, 444, 102

Lebreton, Y., & Goupil, M. J. 2012, A&A, 544, L13

Lindsay, C. J., Ong, J. M. J., & Basu, S. 2023, ApJ, 950, 19

Mazumdar, A., Basu, S., Collier, B. L., & Demarque, P. 2006, MNRAS, 372, 949

Mazumdar, A., Monteiro, M. J. P. F. G., Ballot, J., et al. 2014, ApJ, 782, 18

Miglio, A., Montalbán, J., Noels, A., & Eggenberger, P. 2008, MNRAS, 386, 1487

Miglio, A., Montalbán, J., Carrier, F., et al. 2010, A&A, 520, L6

Mombarg, J. S. G., Dotter, A., Rieutord, M., et al. 2022, ApJ, 925, 154

Monteiro, M. J. P. F. G., & Thompson, M. J. 2005, MNRAS, 361, 1187

Monteiro, M. J. P. F. G., Christensen-Dalsgaard, J., & Thompson, M. J. 1994, A&A, 283, 247

Monteiro, M. J. P. F. G., Christensen-Dalsgaard, J., & Thompson, M. J. 2000, MNRAS, 316, 165

Mosser, B., Vrard, M., Belkacem, K., Deheuvels, S., & Goupil, M. J. 2015, A&A, 584, A50

Ong, J. M. J., & Gehan, C. 2023, ApJ, 946, 92

Østensen, R. H., Telting, J. H., Reed, M. D., et al. 2014, A&A, 569, A15

Pinçon, C. & Takata, M. 2022, A&A, 661, A139

Ricker, G. R., Winn, J. N., Vanderspek, R., et al. 2015, J. Astron. Telesc. Instrum. Syst., 1, 014003

Rodríguez-López, C., Moya, A., Garrido, R., et al. 2010, MNRAS, 403, 1983

Roxburgh, I. W. 2009, A&A, 493, 185

Roxburgh, I. W., & Vorontsov, S. V. 1994, MNRAS, 268, 880

Roxburgh, I. W., & Vorontsov, S. V. 1999, ASP Conf. Ser., 173, 257

Roxburgh, I. W., & Vorontsov, S. V. 2001, MNRAS, 322, 85

Saunders, D. P., Ong, J. M. J., & Basu, S. 2023, ApJ, 947, 22

Takata, M. 2016, PASJ, 68, 109

Tassoul, M. 1980, ApJS, 43, 469

Thompson, M. J. 1988, ESA Spec. Publ., 286, 321

Unno, W., Osaki, Y., Ando, H., Saio, H., & Shibahashi, H. 1989, Nonradial Oscillations of Stars (Tokyo: University of Tokyo Press)

Uzundag, M., Baran, A. S., Østensen, R. H., et al. 2017, MNRAS, 472, 700

Van Reeth, T., Tkachenko, A., Aerts, C., et al. 2015, ApJS, 218, 27

Verma, K., Faria, J. P., Antia, H. M., et al. 2014, ApJ, 790, 138

Verma, K., Raodeo, K., Antia, H. M., et al. 2017, ApJ, 837, 47

Verma, K., Raodeo, K., Basu, S., et al. 2019, MNRAS, 483, 4678

Vorontsov, S. V. 1988, in Advances in Helio- and Asteroseismology, eds. J. Christensen-Dalsgaard, & S. Frandsen, IAU Symp., 123, 151

Vrard, M., Cunha, M. S., Bossini, D., et al. 2022, Nat. Commun., 13, 7553

Winget, D. E., van Horn, H. M., & Hansen, C. J. 1981, ApJ, 245, L33

Winget, D. E., Nather, R. E., Clemens, J. C., et al. 1991, ApJ, 378, 326
## Appendix A: Variational principle

Our starting point is the wave equation A1 of Appendix A of Cunha et al. (2019) written in terms of the variable $\Psi = (r^3/g\rho\tilde{f})^{1/2}\delta p$ (cf. section 2). The equation resulting from the linear, adiabatic pulsation equations for the case of a spherically symmetric equilibrium under the Cowling approximation, is then

$$ \Psi'' + K^2\Psi = 0, \qquad (A.1) $$

where a prime represents a differentiation with respect to $r$ and we shall approximate the radial wavenumber $K$ as in equation (4), given our interest in pure g modes.

Multiplying equation (A.1) by the complex conjugate $\Psi^\dagger$, integrating once by parts between the turning points $r_1$ and $r_2$ and rearranging, we find the following integral equation for the periods:

$$ P^2 = \frac{\int_{r_1}^{r_2} (\Psi')^2 dr + \int_{r_1}^{r_2} \frac{L^2}{r^2} \Psi^2 dr - [\Psi' \Psi^\dagger]_{r_1}^{r_2}}{\int_{r_1}^{r_2} \frac{L^2 N^2}{4\pi^2 r^2} \Psi^2 dr} \equiv \frac{F}{I}. \qquad (A.2) $$

Next we consider a small localised perturbation to a reference model characterised by $N_0$, such that no change is induced to the turning points. Small perturbations to the periods induced by the change to the reference model are given by

$$ \delta P^2 \approx \frac{\delta F - P^2 \delta I}{I_0}. \qquad (A.3) $$

To first order, the perturbation of the eigenfunctions do not contribute to the perturbation of the periods. Thus $\delta F = 0$ and we find

$$ \delta P \approx -\frac{P}{2} \frac{\delta I}{I_0} = -\frac{P}{2} \frac{\int_{r_1}^{r_2} \frac{L^2 \delta N^2}{4\pi^2 r^2} \Psi_0^2 dr}{\int_{r_1}^{r_2} \frac{L^2 N_0^2}{4\pi^2 r^2} \Psi_0^2 dr}, \qquad (A.4) $$

where $\Psi_0$ is the solution in the reference model and is asymptotically given by Gough et al. (1993),

$$ \Psi_0 \sim \tilde{\Psi}_0 K_0^{-1/2} \sin\left(\int_{r_1}^{r} K_0 dr + \frac{\pi}{4}\right), \qquad (A.5) $$

and $\tilde{\Psi}_0$ is a constant. The integral in the denominator of equation (A.4) can be readily calculated. Taking $K_0 \approx LN_0/r\omega$ in the amplitude of the eigenfunction $\Psi_0$, we find

$$ I_0 \approx \frac{\omega}{4\pi^2} \tilde{\Psi}_0^2 \int_0^{\tilde{\omega}_{g,0}} \sin^2\left(\frac{\tilde{\omega}_{g,0}^r}{\omega} + \frac{\pi}{4} + \tilde{\delta}\right) d\tilde{\omega}_{g,0}^r \approx \frac{\omega}{8\pi^2} \tilde{\Psi}_0^2 \omega_{g,0}. \qquad (A.6) $$

### A.1. Small step-like glitch

To proceed with the calculation of $\delta P$ we need first to define the reference model and the glitch shape. Here we consider the case of a decreasing step-like glitch in the inner half of the g-mode cavity and define the reference model such that to first order in $\delta N/N_0$ there is no smooth contribution to the period perturbations. Specifically, we define a linearly varying $N_0$ around the glitch given by

$$ N_0 = N_{in} + \frac{\Delta N}{\Delta \omega_g} (\tilde{\omega}_g^a - \tilde{\omega}_g^r), \qquad (A.7) $$

<figure><img src="image_7.png" /><figcaption>Fig. A.1. Schematic view of the buoyancy frequency in the reference model around the glitch ($N_0$, in red) in comparison to that in the model with the glitch ($N$, in black). Quantities are shown in arbitrary units.</figcaption></figure>

where $\Delta\omega_g = \tilde{\omega}_g^b - \tilde{\omega}_g^a$ and $\Delta N = N_{in} - N_{out}$. Here, $\tilde{\omega}_g^a$ and $\tilde{\omega}_g^b$ are equidistant from $\tilde{\omega}_g^*$ and we assume the transition of $N_0$ to $N_{in}$ and $N_{out}$ on each side of $\tilde{\omega}_g^*$ occurs on a scale much greater than the local characteristic scale of the wave, ensuring that $\Delta\omega_g \gg \omega$. Also, any variations of $N$ within the interval $\Delta\omega_g$ in addition to the jump at $\tilde{\omega}_g^*$ are ignored, by comparison with the variation at the glitch. A schematic view of $N_0$ is shown in Fig. A.1.

While this is clearly a simplified reference model, in particular because its first derivative is discontinuous at the points $\tilde{\omega}_g^a$ and $\tilde{\omega}_g^b$ where it merges into $N$, it suffices our purpose, as the dominant feature in the perturbation $\delta N$ defined from this reference model is still the glitch in $N$. It is clear from symmetry, that in this case

$$ \int_0^{\tilde{\omega}_g} \delta N d\tilde{\omega}_{g,0}^r = \int_{r_1}^{r_2} L N_0 \delta N \frac{dr}{r} = 0. \qquad (A.8) $$

Noting that $N_0$ varies by a maximum of $O(\Delta N)$ about $N_0^*$ within the interval where $\delta N$ differs from zero, we find that the smooth component in equation (19) scales with $(\delta N/N)^2$, as per our choice of the reference model.

With the reference model defined as above one then finds

$$ \frac{\delta N}{N_0} \approx -\frac{\Delta N^*}{N_0^*} \left[ \mathcal{H}(\tilde{\omega}_g^r - \tilde{\omega}_g^{r*}) + \frac{\tilde{\omega}_g^a - \tilde{\omega}_g^r}{\Delta\omega_g} \right], \qquad (A.9) $$

in the region where $\delta N$ is non-zero, where $\mathcal{H}$ is the Heaviside function.

Finally, with $\delta N$ in hand, we can calculate the integral on the numerator of equation (A.4) and the respective $\delta P$. Specifically,

$$ \delta I = \frac{\omega}{2\pi^2} \tilde{\Psi}_0^2 \int_{\tilde{\omega}_{g,0}^2}^{\tilde{\omega}_{g,0}^b} \frac{\delta N}{N_0} \sin^2\left(\frac{\tilde{\omega}_{g,0}^r}{\omega} + \frac{\pi}{4} + \tilde{\delta}\right) d\tilde{\omega}_{g,0}^r. \qquad (A.10) $$

Integrating once by parts and noting that $d/d\omega_g^r = d/d\omega_{g,0}^r(1 + O(\delta N/N_0))$ and $\Delta\omega_g = \Delta\omega_{g,0}(1 + O(\delta N/N_0))$, we find

$$ \delta I \approx -\frac{\omega^2}{8\pi^2} \tilde{\Psi}_0^2 \left[ \frac{\Delta N}{N_0} \right]_{r^*} \left[ 1 - \frac{\omega}{\Delta\omega_g} \sin\left(\frac{\Delta\omega_g}{\omega}\right) \right] \sin(2\tilde{\beta}_2). \qquad (A.11) $$
Recalling that $\Delta\omega_g \gg \omega$ and that $\omega_g = 2\pi^2/\Delta P_{as}$, we then find, to first order in $\delta N/N_0$, that

$$ \delta P \approx \frac{\Delta P_{as}}{2\pi} \left[ \frac{\Delta N}{N_0} \right]_{r^*} \sin(2\tilde{\beta}_2), \qquad (A.12) $$

which is equivalent to equation (19) for the case of a zero smooth contribution, as expected.

## A.2. Small Gaussian-like glitch

In the case of a Gaussian-like glitch, the reference model is defined by the buoyancy frequency in the absence of the Gaussian perturbation. Thus, the perturbation relative to that reference is simply

$$ \frac{\delta N}{N_0} = \frac{\Delta N}{N_0} \approx \frac{A_G}{\sqrt{2\pi}\Delta_g} \exp\left(-\frac{(\omega_g^r - \omega_g^\star)^2}{2\Delta_g^2}\right). \qquad (A.13) $$

Substituting in equation (A.10) and combining with equation (A.6), one finds, from equation (A.4),

$$ \delta P \approx -P_0 \frac{\Delta P_{as}}{2\pi^2} A_G + \frac{\Delta P_{as}}{\pi} A_G f_{\omega}^{\Delta_g} \cos(2\beta_2), \qquad (A.14) $$

where we neglected the difference between $\omega_{g,0}$ and $\omega_g$ in the definition of $\beta_2$, as this difference is $\sim O(\delta N/N_0)$.

# Appendix B: Marginalised distributions

Here we provide the priors (Table B.1) and marginalised distributions for the fits of equation (10) to the model data, considering the step-like glitch (Fig. B.1) and Gaussian-like glitch (Fig. B.2).

<table><caption>**Table B.1.** Lower and upper limits of the uniform prior distributions applied in the fit of equation (10) to model data, for the cases of a step-like glitch (equation (16)) and Gaussian-like glitch (equation (22)).</caption><thead><tr><th>Parameter</th><th>Step-like</th><th>Gaussian-like</th></tr></thead><tbody><tr><td>P<sub>s,min</sub> (s)</td><td>49000<br>56000</td><td>14900<br>15000</td></tr><tr><td>ΔP<sub>as</sub> (s)</td><td>7000<br>10000</td><td>65<br>69</td></tr><tr><td>A<sub>st</sub> or A<sub>G</sub> (10<sup>-6</sup> rad/s)</td><td>1<br>15</td><td>300<br>800</td></tr><tr><td>ω<sub>g</sub><sup>*</sup> (10<sup>-6</sup> rad/s)</td><td>300<br>400</td><td>1500<br>2000</td></tr><tr><td>Δ<sub>g</sub> (10<sup>-6</sup> rad/s)</td><td>—<br>—</td><td>100<br>200</td></tr><tr><td>δ</td><td>-π/2<br>π/2</td><td>-π/2<br>π/2</td></tr><tr><td>jiter ≡ σ (s)</td><td>0<br>inf</td><td>0<br>inf</td></tr></tbody></table>
<figure><img src="image_8.png" /><figcaption>**Fig. B.1.** Marginalised distributions for the parameters considered in the fit to model data of the expression for the step-like glitch (equation (10) with $\Phi$ defined by equation (16)).</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>**Fig. B.2.** Marginalised distributions for the parameters considered in the fit to model data of the expression for the Gaussian-like glitch (equation (10) with $\Phi$ defined by equation (22)).</figcaption></figure>
## Appendix C: Glitch phase $\Phi$ for mixed modes

Here we discuss how the glitch phase $\Phi$ is modified when considering mixed modes instead of pure gravity modes. To establish the eigenvalue condition in the presence of a glitch, Cunha et al. (2015) and Cunha et al. (2019) started from equation (A.1), considering the asymptotic solutions on either side of the glitch. When studying the impact on pure g modes (i.e. in the absence of mode coupling), well inside the g-mode cavity, the solutions inwards and outwards from the glitch location are, respectively,

$$ \Psi_{\text{in}} \sim \tilde{\Psi}_{\text{in}} K_{\text{in}}^{-1/2} \sin \left( \int_{r_1}^{r} K_{\text{in}} dr + \frac{\pi}{4} \right), \quad (\text{C.1}) $$

and

$$ \Psi_{\text{out}} \sim \tilde{\Psi}_{\text{out}} K_{\text{out}}^{-1/2} \sin \left( \int_{r}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} \right), \quad (\text{C.2}) $$

where $\tilde{\Psi}_{\text{in}}$ and $\tilde{\Psi}_{\text{out}}$ are constants and $K_{\text{in}}$ and $K_{\text{out}}$ refer again to K computed inwards and outwards from the glitch location, respectively.

In the case of mixed modes, the solution outwards from the glitch position is modified due to mode coupling. That can be accounted for by introducing a coupling phase $\varphi$ in equation (C.2) that accounts for the impact of the coupling. In that case (Cunha et al. 2019),

$$ \Psi_{\text{out}} \sim \tilde{\Psi}_{\text{out}} K_{\text{out}}^{-1/2} \sin \left( \int_{r}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi \right), \quad (\text{C.3}) $$

where the frequency dependent coupling phase is given by

$$ \varphi = \operatorname{atan} \left[ \frac{q}{\tan \left[ \left( \omega - \omega_{a,n} \right) / \omega_p \right]} \right], \quad (\text{C.4}) $$

with

$$ \omega_p = \left( \int_{r_3}^{r_4} c^{-1} dr \right)^{-1} \approx 2\Delta v. \quad (\text{C.5}) $$

Here, $r_3$ and $r_4$ are the turning points of the p-mode cavity and q is the coupling coefficient (Unno et al. 1989; Takata 2016). Also, $\omega_{a,n}$ is the angular frequency of what would be the pure acoustic mode of (pressure) radial order $n$, in the absence of mode coupling. Based on the asymptotic solutions and the conditions obeyed by them across the glitch, the authors derived eigenvalue conditions appropriate for each case under study.

To proceed, we consider the case of a decreasing step-like buoyancy glitch as an example. It is straightforward to show that the conclusions remain the same for other shapes of the buoyancy glitch, by performing a similar analysis.

The eigenvalue condition derived by Cunha et al. (2019) for a decreasing step-like buoyancy glitch dropping by $A_{\text{st}} = N_{\text{in}}/N_{\text{out}} - 1$ at $r^*$ in the absence of coupling is

$$ \sin \left( \int_{r_1}^{r_2} K dr + \frac{\pi}{2} \right) = -A_{\text{st}} \sin \left( \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} \right) \cos \left( \int_{r_1}^{r^*} K_{\text{in}} dr + \frac{\pi}{4} \right). \quad (\text{C.6}) $$

Following the same analysis, but replacing equation (C.2) by equation (C.3), it follows that the eigenvalue condition becomes

$$ \sin \left( \int_{r_1}^{r_2} K dr + \frac{\pi}{2} + \varphi \right) = -A_{\text{st}} \sin \left( \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi \right) \cos \left( \int_{r_1}^{r^*} K_{\text{in}} dr + \frac{\pi}{4} \right). \quad (\text{C.7}) $$

We now consider separately the cases of a glitch in the inner half and the outer half of the g-mode cavity. For a glitch in the inner half of the g-mode cavity one has

$$ \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi = \int_{r_1}^{r_2} K dr + \frac{\pi}{2} + \varphi - \int_{r_1}^{r^*} K_{\text{in}} dr - \frac{\pi}{4}, \quad (\text{C.8}) $$

and substituting in Eq. (C.7) one finds

$$ \sin \left( \int_{r_1}^{r_2} K dr + \frac{\pi}{2} + \Phi + \varphi \right) = 0, \quad (\text{C.9}) $$

where $\Phi$, and a new quantity, $B$, are defined by the following system of equations,

$$ \left\{ \begin{aligned} B \cos \Phi &= 1 + A_{\text{st}} \cos^2 \left( \int_{r_1}^{r^*} K_{\text{in}} dr + \frac{\pi}{4} \right), \\ B \sin \Phi &= -\frac{1}{2} A_{\text{st}} \cos \left( 2 \int_{r_1}^{r^*} K_{\text{in}} dr \right). \end{aligned} \right. \quad (\text{C.10}) $$

By comparing with equation (16), we thus conclude that in the case of a glitch located in the inner half of the g-mode cavity, the glitch phase $\Phi$ entering the perturbation to the mixed-mode frequencies is the same as that derived for the pure g modes.

For a glitch in the outer half of the g-mode cavity one has instead

$$ \int_{r_1}^{r^*} K_{\text{in}} dr + \frac{\pi}{4} = \int_{r_1}^{r_2} K dr + \frac{\pi}{2} + \varphi - \int_{r^*}^{r_2} K_{\text{out}} dr - \frac{\pi}{4} - \varphi. \quad (\text{C.11}) $$

Substituting in equation (C.7), we find again equation (C.9), but with the glitch phase now defined by the system of equations

$$ \left\{ \begin{aligned} B \cos \Phi &= 1 + A_{\text{st}} \sin^2 \left( \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi \right), \\ B \sin \Phi &= \frac{1}{2} A_{\text{st}} \cos \left( 2 \int_{r^*}^{r_2} K_{\text{out}} dr + 2\varphi \right). \end{aligned} \right. \quad (\text{C.12}) $$

In this case the glitch phase can be written as,

$$ \Phi = \arccot \left[ \frac{2}{A_{\text{st}} \cos \left( 2 \int_{r^*}^{r_2} K_{\text{out}} dr + 2\varphi \right) + \tan \left( \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi \right)} \right]. \quad (\text{C.13}) $$

To see how the glitch phase is modified for the mixed modes in this case, one can compare equation (C.13) to equation (16). Recalling that $\Delta N = N_{\text{in}} - N_{\text{ou}}$, we rewrite $A_{\text{st}} = N_{\text{in}}/N_{\text{ou}} - 1 = \Delta N/(N_{\text{in}} - \Delta N)$. Using $A_{\text{st}}$ expressed in terms of $\Delta N$ in equation (C.13) and noting that $\tan(\theta)+\cot(\theta) = 1/(\sin(\theta)\cos(\theta))$ for any $\theta$, equation (C.13) can be rewritten as

$$ \Phi = \arccot \left[ - \frac{2}{\hat{A}_{\text{st}} \cos \left( 2 \int_{r^*}^{r_2} K_{\text{out}} dr + 2\varphi \right) - \cot \left( \int_{r^*}^{r_2} K_{\text{out}} dr + \frac{\pi}{4} + \varphi \right)} \right]. \quad (\text{C.14}) $$

Equation (C.14) has the same functional form as equation (16), and we note that the appearance of $\hat{A}_{\text{st}}$ instead of $A_{\text{st}}$ was anticipated given that by symmetry a decreasing step-like glitch in the outer cavity should imprint the same signature on pure g modes as an increasing step-like glitch in the inner g-mode cavity, with an associated positive amplitude defined by $\hat{A}_{\text{st}}$. Nevertheless, there is a second important difference that we can identify when comparing the two results. In the case of the mixed
modes and a glitch located in the outer half of the *g*-mode cavity, the arguments of the sinusoidal functions change, incorporating, in addition, the coupling phase, $\varphi$. This means that the coupling between the two cavities will impact the glitch phase

when the glitch is located in the outer half of the cavity. To recover the same expression for $\Phi$ as in the pure *g*-mode case, one must now include the coupling phase $\varphi$ in the definition of $\beta_2$.