Empirical Relations for the Sensitivities of Solar-like Oscillations to Magnetic Perturbations

Oscillation mode frequencies of stars are typically treated as static for a given stellar model. However, in reality they can be perturbed by time varying sources such as magnetic fields and flows. We calculate the sensitivities of radial p-mode oscillations of a set of models for masses between 0.7-3.0 M$_{\odot}$ from the main sequence to the early asymptotic giant branch. We fit these mode sensitivities with polynomials in fundamental stellar parameters for six stages of stellar evolution. We find that the best-fitting relations differ from those proposed in the literature and change between stages of stellar evolution. Together with a measure of the strength of the perturbation, e.g., of the level of magnetic activity, the presented relations can be used for assessing whether a star's observed oscillation frequencies are likely to be close to the unperturbed ground state or whether they should be adjusted.


INTRODUCTION
Owing to the revolution that the high-quality spacephotometry data of Kepler (Borucki et al. 2010;Koch et al. 2010), CoRoT (Auvergne et al. 2009;Baglin et al. 2006), and TESS (Ricker et al. 2014) have brought about, many thousands of stars now have measured oscillation frequencies. These stars cover very different stages of evolution from the main sequence (e.g., Appourchaux et al. 2012;Lund et al. 2017), to subgiants (Appourchaux et al. 2012), red giants (e.g., Corsaro et al. 2015;Kallinger 2019), core helium burning and asymptotic giant branch (AGB) stars (Kallinger 2019), and even white dwarfs (Hermes et al. 2017). Their oscillation frequencies can be subject to perturbations due to intrinsic time varying sources, for example magnetic activity: it is well known that for the Sun pmode frequencies of low-degree modes at the frequency of maximum oscillation amplitude ν max vary by about 0.4 µHz over the course of the solar activity cycle (Woodard & Noyes 1985;Elsworth et al. 1990;Libbrecht & Woodard 1990;Jiménez-Reyes et al. 1998). Similar behaviour has been observed for other main-sequence stars (e.g., García et al. 2010;Kiefer et al. 2017a;Santos et al. 2018).
Stellar activity appears to persist all the way through a star's evolution from the main sequence to the AGB: activity cycles have been detected on dozens of main-sequence stars (e.g., Baliunas et al. 1995); Aurière et al. (2015) measured ⋆ E-mail: r.kiefer@warwick.ac.uk magnetic fields at the surface of K and G giants; starspots have been detected on various types of stars (see references in Berdyugina 2005). Whether activity is generated by global cyclic dynamos or by local turbulent mechanisms is, in first approximation, not relevant for the perturbation of mode frequencies.
Several frameworks for understanding how various perturbations affect oscillation mode parameters have been developed, mostly with the Sun as the benchmark: Dziembowski & Goode (2004) used a variational approach to quantify the effect of the change of dynamical quantities over the solar cycle on mode frequencies. Coupling of normal-modes within the framework of quasi-degenerate perturbation theory was investigated by Roth et al. (2002) to calculate the effect of large-scale flows on p modes, by Schad et al. (2013) to size the meridional circulation, and by Kiefer et al. (2017b) and Kiefer & Roth (2018) to assess the effect of global toroidal magnetic fields on p-mode frequencies and eigenfunctions. Hanasoge (2017) also exploits normal mode coupling, but with first-Born perturbation theory, to gauge the impact of Lorentz stresses on p-mode oscillations.
Recently, Howe et al. (2020) found that the solar ν max varies by as much as 25 µHz over the Sun's activity cycle. In an asteroseismic context, it may thus be important to account for activity related variations of ν max and perturbations of measured mode frequencies when they are used to model the stellar structure or to infer global stellar parameters such as radius and mass (see also Kiefer et al. 2019;Pérez Hernández et al. 2019). The magnitude of the frequency shifts can be estimated by the product of a factor accounting for the sensitivity of the oscillations to a perturbation and a factor for the strength of the perturbation, as we will detail in Section 3. In their effort to estimate the number of stars with detectable activity related p-mode frequency shifts in TESS data, Kiefer et al. (2019) derived the mode sensitivity S to be proportional to RM −1 ν −1 max , where R is the stellar radius and M is stellar mass. This is very similar to the modal sensitivity contribution which Karoff et al. (2009) gave using the relation of Metcalfe et al. (2007), which was S ∝ R 2.5 L 0.25 M −2 , where L is stellar luminosity. The scaling suggested by Chaplin et al. (2007) did not incorporate a factor for mode sensitivity, but simply assumes linear scaling of mode frequency shifts with the level of activity.
The exponents in these relations are fixed and it is thus expected that they cannot capture the variation of the mode sensitivity over the entire evolution from the main sequence to the early AGB. In this paper, we first describe the stellar evolutionary models we use to calculate the mode sensitivity in Section 2. The derivation of the mode sensitivity factor follows in Section 3. We then fit these sensitivities for six stages of stellar evolution with several polynomials in stellar fundamental parameters, as described in Section 4. The results are discussed in Section 5 and the conclusions we draw from these results follow in Section 6.

MODELS
We computed stellar models using Modules for Experiments in Stellar Astrophysics (MESA) 1 , revision 12115 (Paxton et al. 2011(Paxton et al. , 2013(Paxton et al. , 2015(Paxton et al. , 2018(Paxton et al. , 2019, for fifteen initial stellar masses and evolved them to the early AGB. We used the MESA test suite inlist for the evolution of a 1 M ⊙ star which is stored in the MESA installation's folder '\star\test_suite\1M_pre_ms_to_wd', adjusted the initial mass and, in order to have a better resolution of the main-sequence and the core helium burning phases, the maximum time between two models. The initial masses and their respective maximum time step values are given in Table 1. We terminated the evolution at the thermally pulsing (TP)-AGB, but as we are only considering stellar models with ν max > 1 µHz (see Table 2), the more evolved models on the AGB are not included in our study. A sample MESA inlist is given in Appendix A1 but will also be made available online.
The models use the solar metal mixture of Grevesse & Sauval (1998) with a helium abundance of Y ⊙ = 0.248 and a metallicity of Z ⊙ = 0.017. The atmospheric model uses the MESA default, a standard Eddington grey atmosphere. The opacities are those of Iglesias & Rogers (1993, 1996 and the MESA option for C/O enhancement during and after helium burning is enabled with a base metallicity of 0.02. The adiabatic radial p-mode eigenfunctions and eigenfrequencies of all models were computed with the oscillation code GYRE 2 (Townsend & Teitler 2013; Townsend et al. 2018). A sample GYRE inlist is given in Appendix A2 but will also be made available online. Figure 1 shows a Hertzsprung-Russell diagram of the models we selected based on the requirements that they have a convection zone with a top boundary above 0.99 R, they have reached the main sequence, and their expected ν max is greater than 1 µHz. The requirement on the outer convection zone boundary ensures that p modes are detectable at the surface and are not suppressed by a thick outer radiative zone. We then separated the remaining models into six evolutionary stages based on the conditions listed in the second column of Table 2. The third column gives the final number of models in each stage. The partitioning into main sequence, subgiant and the red giant branch (RGB), core He burning, and AGB is founded on different stages of energy production and core composition. The subdivision of the RGB into lower RGB, upper RGB, and tip RGB models was guided by the phenomenology of the mode sensitivities. In particular, the separation of upper and tip RGB models improved the quality of the polynomial fits, as will be described in Section 4. Ten subgiant models are bluewards of the red edge of the instability strip defined by Chaplin et al. (2011) as where the luminosity L is in solar units. These models have square symbols in Figure 1 and in all following plots.

MODE SENSITIVITY
We start with the variational expression for frequency shifts derived by Dziembowski & Goode (2004) (compare to their equation 18) and quoted by Metcalfe et al. (2007) in their equation 1: where K i is the kernel function relating perturbations caused by a source function S i to the shifts δν i , I i is the mode inertia, and ν i is the frequency of mode i in µHz. The integral is calculated over the entire stellar volume V. In the following, we will ignore the contribution of magnetic activity to Eq.
(2) and assume that the resulting frequency shift is linear in the level of activity: δν = S · A, where S is the sensitivity of a mode to a perturbation and A is a measure of the level of activity. Just as in Metcalfe et al. (2007), we shall assume that the dominant term in the kernel of p modes is proportional to |divξ | 2 , where ξ is the displacement eigenfunction. We consider only radial modes, which considerably simplifies the calculations. With this, the kernel function is where ξ r (r) is the radial displacement eigenfunction at radial position r. We assume the perturbation is located within one pressure scale height H p below the photosphere with uniform and normalized strength Here, Θ is the Heaviside step function and d is the depth below the photospheric radius of the model. Thus, in this article we make no assumption about the level of magnetic activity affecting the modes or how this evolves over the stellar lifetime. With this definition of the source function, we explicitly concentrate on (near-)surface magnetic activity affecting mode frequencies. From the Sun, it is known that the activity related frequency shifts largely originate from the near-surface regions (e.g., Broomhall 2017). Similar behaviour has been observed on other solar-like oscillators by, e.g., Salabert et al. (2011Salabert et al. ( , 2016a and Kiefer et al. (2017a). Deeper located magnetic fields or core magnetic fields are likely to affect the temporal stability of mode frequencies less (e.g., Gough & Thompson 1990;Kiefer & Roth 2018). This is because such magnetic fields have a much smaller effect on p modes than near-surface fields due to the drop in sensitivity. Further, core fields are assumed to be stable over very long time scales, meaning they are unlikely to bring about a mode frequency variation on observable time scales. The deeper a magnetic field is located, the stronger it has to be to achieve the same level of frequency shift. We will discuss this further in Section 5.2.
In Eq.
(2), the mode inertia I is calculated as where the integral extends over the stellar volume V, ρ is density, and the displacement eigenfunction ξ can again be replaced by ξ r (r), as we consider only radial modes. For simplicity, we investigate only the oscillation mode i closest to ν max , which is calculated for each model with the scaling relation of Kjeldsen & Bedding (1995): with the calibrated solar reference value ν max⊙ = 3104 µHz of Mosser et al. (2013), the solar values of mass M ⊙ = 1.9892· 10 33 g, radius R ⊙ = 6.9598·10 10 cm, and effective temperature T eff⊙ = 5777 K as used in the MESA code. R and M are the model's photospheric radius and mass, respectively. With the above definitions Eqs.
(3), (4), (5) and the stated assumptions, we calculate the right-hand side of Eq. (2) for the set of stellar models described in Section 2 and call this the mode sensitivity S of a star: where the index 'i,max' indicates the mode closest to ν max . The unit of S is cm g −1 µHz −1 .
To better illustrate how the observed behaviour of the mode sensitivities comes about, we show the three main quantities that make up the sensitivities, separately:

Pressure scale height
The vertical distance over which hydrostatic pressure increases by a factor of e in a stratified atmosphere can be written as where it was taken that ρ ∝ M R −3 and g ∝ M R −2 , where g is surface gravity. It was assumed that the stellar photosphere follows the equation-of-state of an ideal gas P ∝ ρT, where P is pressure and T is temperature. Further, the Stefan-Boltzmann law was used to express temperature as T ∝ L 0.25 R −0.5 . Figure 2 shows the pressure scale heights from the stellar models with the same colour code for the six stages of stellar evolution as described in Fig. 1 and detailed in Table 2. It is calculated for each model as the depth of that grid point at which the pressure is closest to e · P(photosphere). The left panel shows the first two stages and the right panel comprises the last four stages in order to increase clarity as ν max is the ordinate. The scale heights H p, calc calculated using Eq. (8) are shown in yellow data points. The values are scaled such that Eq. (8) yields a value of 150 km for the Sun.
As the models are in hydrostatic equilibrium, the models' pressure scale heights and the value obtained from Table 2. Separation of evolutionary stages, number of models in each stage, relation in Table 3 which gives the lowest mean absolute error between fit and model sensitivities for each stage, and letter symbol that is used to identify this stage.

Stage
Conditions # models Best-fitting relation ID Main sequence • Centre hydrogen content > 10 −5 Notes. L tot is the total luminosity of the star including all sources. L H and L He are the contributions to the total luminosity from hydrogen and helium burning processes, respectively Eq. (8) are within a few percent: the data points largely overlap. The bottom sections of the panels in Fig. 2 show the normalized difference between the two sets of values. The ideal gas assumption and that of a perfect black body will obviously affect the degree of accuracy of the rather simplistic Eq. (8) through stellar evolution where photospheric conditions highly vary. The largest relative systematic deviation between the models' scale heights and those from Eq. (8) are found during the subgiant stage. However, being within a few tens of percent of the model values, Eq. (8) is a good approximation of stellar photospheric pressure scale heights.

Integral over kernel function
The integral extends over the stellar volume of the outer pressure scale height from the photospheric radius inwards. We assume the source function S to be unitless. As the unit of the eigenfunctions is cm, the unit of the numerator in Eq.
The integral values of all investigated models are presented in Figure 3 with colours and separation into two panels as in Fig. 2. On the main sequence, models around ν max ≈ 2000 µHz have the largest integral values. Higher mass stars have higher values than lower mass stars at same ν max . For the subgiant and lower RGB stars there is a spike in integral values for masses 1.5 − 2 M ⊙ around ν max ≈ 600 µHz. This increase is due to a surge in the pressure scale height for these stars, thus more of the stellar ra-dius and the kernel function are integrated over. The ridges correspond to different radial orders of the mode closest to ν max . For the models in the tip RGB phase (red data points), the five ridges correspond to radial orders n = 3 − 7, counting from lowest to highest ν max . To increase clarity of the figure, a few core He burning models with integral values < 10 42 were cut.

Mode inertia
The integral in Eq. (5) extends over the entire stellar volume and amounts to a weighting of the stellar density with the eigenfunctions being the weights. Mode inertia is of the unit cm 2 g. Figure 4 shows the mode inertias with colours and separation into two panels as in Fig. 2. The ridges correspond to different mass values, with lower masses having smaller inertias. As the radial modes that are investigated here propagate throughout the star, mode inertias tend to be larger for higher mass stars. This also explains the steep increase with lower ν max .

FITS OF POLYNOMIALS OF STELLAR PARAMETERS
The mode sensitivity value S of the mode eigenfunction closest to each model's estimated ν max was calculated as described in Section 3. For the ease of plotting, S was multiplied by a factor of 10 16 before the fits were carried out.  Table 2 with colours as in Fig. 1 Table 2 with colours as in Fig. 1  each evolutionary stage separately with letter labels in the top right of each panel as given for the different evolutionary stages in Table 2. Various polynomial models, which are described in the second column of Table 3, were then fitted to S independently for each evolutionary stage. The best-fit parameters obtained from collecting 1000 least-squares fits, each with randomly chosen initial values for the parameters, are given in columns three to eight of Table 3. The initial values were limited to the half-open interval [−50, 50). Fits for which the absolute of any exponent was >50 were neglected. The fits were repeated until 1000 stable samples were found. The best fit is chosen as that one with the smallest mean absolute error (MAE) between fit and calculated sensitivities. The last column of Table 3 gives the MAE of the best fit. The mean absolute error is calculated as where, against the usual definition of the MAE, we subtract the number of degrees of freedom of each fit model, dof, from the number of data points N in order to penalize use of more free parameters. The fit models were chosen such as to include global stellar parameters which are readily available either from asteroseismic analyses of space telescope light-curves or from spectroscopic data. Thus, models 1 and 4 only include radius R, mass M, and frequency of maximum oscillation amplitude ν max , which can be measured from sufficiently long photometric time series. Effective temperature T eff , luminosity L, and surface gravity log g, which enter models 2, 3, 5, 6, and 7 have to be obtained from, e.g., Gaia measurements or other spectroscopic observations of the star in question. Model 7 is a solely spectroscopic relation, should seismic parameters and estimates of mass and radius not be available. Figure 5 also shows the fits of relations to the models' sensitivity factors. Blue data points are sensitivities calculated from the MESA/GYRE models and amber circles show the best-fitting relation. Note that the ordinates of all panels are frequency of maximum oscillation amplitude ν max with differing value domain between panels, as well as that the abscissae of all panels show the model mode sensitivities S with differing domains between panels. In the interest of improved clarity, the parameters of the best-fitting relation for each evolutionary group are given in Table 4.

DISCUSSION
The mode sensitivities for main-sequence stars (panel A of Fig. 5) are largely determined by the kernel functions. This is because their mode inertias do not change strongly through this stage for each stellar mass. The largest sensitivities are found for stars more massive than the Sun. This agrees with the findings of Santos et al. (2019), who found larger activity related frequency shift values for stars of higher effective temperature. In Figure 6, the main-sequence models' sensitivities are plotted as a function of effective temperature T eff . The range of T eff was limited to be the same as in panel c) of Figure 3 of Santos et al. (2019) for easier comparison. The color of the data points indicates stellar age, which, again, was capped at the same value as in Santos et al. (2019), at 13 Gyr. By comparison of these two figures, it can be seen that the mode sensitivities calculated here follow a very similar trend as the measured frequency shifts.
The bottom parts of the six panels in Figure 5 show the normalized residuals between the models' sensitivities and the ones predicted by the best-fitting relations. For the mainsequence models, the residuals are typically a few tens of percent, with larger systematic residuals towards higher values of ν max . Systematically overestimated sensitivities can also be found for models at the low ν max end of panel C (upper RGB) and panel F (AGB). While the residuals can reach up to a factor of a few for some models, the overall agreement between the best-fitting relations' sensitivities and the model sensitivities is much better than for the sensitivity scaling relations from the literature, as we will detail later in this section. For purposes of presentation, we clipped the ordinate of the residuals' panels at 5 for stages B, E, and F. A few single outliers have normalized residuals > 5.
Subgiants (panel B of Fig. 5) have similar mode sensitivities to main-sequence stars. Isaacson & Fischer (2010) found that ≈ 10% of subgiant stars show moderate to strong chromospheric activity. Thus, even though magnetic activity might not be widespread on this stage of stellar evolution, some stars can be expected to show significant activity related frequency shifts. We also note that given, first, the findings of Balona (2019), who found evidence of starspots on hot stars, and, second, the large sensitivities of the few models in the instability strip, possible activity-related time variations of radial oscillation mode amplitudes and frequencies of, e.g., γ Dor, δ Scuti, and roAp variables might be worth further investigation. Amplitude as well as frequency variability have been detected on these types of variables by several groups including but not limited to Holdsworth et al. (2014);Breger (2016) and Bowman et al. (2016).
Overall, mode sensitivities decrease for upper (panel C) and tip RGB stars (panel D). However, given their low mode frequencies, even an activity cycle with solar-like amplitude can lead to detectable frequency shifts in such stars. This requires the cycle length to be of the order of the order of the observational baseline. For core helium burning stars (panel E) there are numerous models with sensitivities of the order of the main sequence again, in particular at around ν max ≈ 30 µHz. A few AGB models (panel F) have again rather large mode sensitivities. Depending on the strength and temporal scale of magnetic activity of upper RGB, core helium burning and even early AGB stars, frequency shifts may be detectable for these types of stars in the available Kepler dataset.
We do not give a physical interpretation to the bestfitting relation within each evolutionary group, but provide them here as convenient short-cuts to estimate the mode sensitivity of individual stars based on a few readily accessible fundamental parameters. As can be seen from Table 3, the exponents in each model we fitted can differ quite drastically from one evolutionary stage to the next. That being said, the jumps in the exponents for polynomials 2 and 4 are relatively small and should one be interested in using a single relation for all stars with only changing the exponents from stage to stage, then either one of these appears to be a justifiable choice. It would in general be possible to obtain uncertainties for the exponents of the polynomial relations, e.g., by using a Markov-chain Monte Carlo estimation of the optimal ex-  Table 4. Panels show the six evolutionary stages as laid out in Table 2. Note that the ordinates and abscissae of the panels have differing value domains. The bottom section of each panel shows the normalized residuals between fitted and model sensitivities. ponents instead of the least-square fit. However, the MAE of each fit reported in Table 3 can be used as a good estimation of the uncertainty if mode sensitivities are calculated.
To assess the impact of the number of models per evolutionary stage on the fits' results and quality, we redid the fits for two scenarios: first, we halved the number of models by taking every second model, effectively reducing the time resolution. With this, the polynomial relations per evolutionary stage that provide the best fit are the same as with the full model set. The exponents however do change, with the largest changes for the tip RGB and core helium burning stages. For these stages, the best-fit relations are now R 6.79 · M 1.16 · L −4.37 · ν 0.60 max and R −3.81 · M −0.54 · L 2.62 , respectively. The residuals and the MAE are on a very similar level as with the full model set for all six stages.
In the second scenario we lowered the number of models to 175 in each stage, which is the number of models of the AGB group. We chose these 175 models randomly from the full set. From this we find similar exponents for the bestfitting relations as for the full model set and the same relations that provide these best fits. The largest changes on the exponents occur again for the tip RGB models, for which the best-fitting polynomial is R 4.32 · M 0.53 · L −2.77 · ν 0.57 max with a MAE of 0.30. For the core helium burning stage, the number of models is reduced by almost a factor of three (from 514 to 175). The best-fitting model now is R −7.78 · M −1.06 · L 5.04 , which is quite similar to the one from the full model set. The removal of some of the higher sensitivity models in this stages leads to a somewhat smaller MAE of 1.52. Overall, the MAE of the fits and the residuals are very similar to the full model set.
From these two checks we conclude that the best-fitting relations that we present in Table 4 provide reasonable estimates for the sensitivities in each evolutionary stage. The number of models within each evolutionary group and with it the temporal resolution that we chose for our grid of models appears adequate to capture the bulk behaviour of mode sensitivities.
In Figure 7, the main-sequence (left panel) and subgiant and lower RGB models' (right panel) sensitivity factors of the best fitting relation (amber data points) are compared to those calculated with the relations of Kiefer et al. (2019) (green) and Karoff et al. (2009) based on the derivations of Metcalfe et al. (2007) (red). As mentioned before, these two relations are rather similar -differing by a factor of merely ∝ √ T eff (see Kiefer et al. 2019) -thus, the green data points are largely covered by the red. We limit the comparison to these two evolutionary stages because these relations were not intended for use far off the main sequence. These two relations have fixed exponents and an unknown coefficient which gets lost in their derivation. As this coefficient has to be the same for all evolutionary stages, we obtained it by fitting the relations to the sensitivities of the main-sequence and subgiant and lower RGB models simultaneously. This gave a coefficient of 28525 for the Kiefer et al. (2019) relation and of 9.03 for the Karoff et al. (2009)-Metcalfe et al. (2007 relation. Their MAE to the combined data of both stages is 7.91 and 7.87, respectively. The combined MAE of the relations found here for these data is 4.28. For the main sequence individually, these values are 4.36 and 4.31 compared to 2.33 for the relation found here. For the subgiants and lower RGB stage they are 13.9 and 13.9 compared to 7.62 for the optimal relation. As can be seen, the relations from the literature do not reproduce the sensitivity factors as well as the empirical relations found here.

Application of the scaling relations
With the relations presented here and a measure of stellar activity, it is possible to estimate activity related frequency shifts for stars from the main sequence to the AGB. We note that the prediction of frequency shifts has to be done with a normalization to a known activity level, typically with the Sun as the standard. For example, one would take the average logarithmic fraction of the solar luminosity that is emitted in the Calcium II H and K lines log R ′ HK⊙ , multiply it by the sensitivity value obtained from the main-sequence relation, and scale the result to obtain the known solar cycle p-mode frequency shift amplitude of 0.4 µHz. This scaling factor can then be applied to stellar log R ′ HK values and the sensitivities from the presented relations to give the expected full-cycle frequency shift values of the respective stars.
We use the main sequence' polynomial from Table 4 and known activity measures for the stars KIC 8006161 (HD 173701), KIC 10644235, and KIC 12009504 to predict their full-cycle frequency shifts. These stars' and the Sun's fundamental parameters as well as their log R ′ HK and mean photometric activity S ph are given in Table 5. See Mathur et al. (2014a,b) for the definition of S ph . The measured frequency shift amplitude δν meas was taken from Santos et al. (2018). It is simply calculated as the difference between their reported maximum and minimum value of the p-mode frequencies.
For KIC 8006161 we find that using log R ′ HK to predict the full-cycle shift gives δν pred,Ca = 0.18 ± 0.04 µHz, whereas the measured shift is δν meas = 1.12 ± 0.09 µHz. Karoff et al. (2013) already found that this star shows an unexpectedly low excess flux in the Calcium lines. Thus, log R ′ HK appears to be an unsuitable activity measure to predict the p-mode shift of this star in particular. For KIC 10644253 the predicted shift using log R ′ HK is much closer to the observed value and and the predicted and observed shifts are even in agreement, within the uncertainty, for KIC 12009504. It should be noted that the values of log R ′ HK were not mea- Table 3. Relations fitted to the theoretical mode sensitivities and their optimal parameters. Within each relation's paragraph, the six rows correspond to the six stages of evolution from  sured contemporaneously to the Kepler data. Depending on at what phase of a star's activity cycle log R ′ HK is measured, it potentially underestimates the full-cycle shifts.
Using the mean photometric activity index S ph to predict the frequency shifts, we find δν pred,Sph = 0.71 ± 0.15 µHz for KIC 8006161, 0.91±0.24 µHz for KIC 10644253, and 0.37±0.11 µHz for KIC 12009504. These are in agreement with the measured values of KIC 10644253 and KIC 12009504. For KIC 8006161 this is again somewhat lower than the measured value. This can be due to two reasons: The sensitivity S is underestimated or S ph is underestimated. As can be seen from the top left panel in Figure 5, our best relation underestimates the sensitivity by a few tens of percent for stars with ν max around 3500 µHz. Furthermore, KIC 8006161 has an inclination of 38 +4 −3 degrees (Karoff et al. 2018). This can lead to an underestimation of its photometric activity, as active regions that lead to a global p-mode frequency shifts, could hide on the out-ofsight portion of the star. Thus, it is likely that both factors contribute to the underestimation of this star's frequency shifts.

Assumption of a global near-surface perturbation
With Eq. (4) we located the cause of the frequency shifts entirely in the outer pressure scale height of the star with an isotropic distribution over the entire stellar sphere. In a study of activity-related p-mode frequency shifts of Kepler stars, Salabert et al. (2018) found that for four stars of their 87 star sample, the shifts have an oscillatory behaviour as a function of mode frequency. Such a behaviour hints towards a cause of at least part of the frequency shifts which is located deeper within the resonant p-mode cavity, possibly at the depth of the He II ionization zone. The sample of Salabert et al. (2018) is limited both in quality and size but poses the very intriguing question of where the (magnetic) perturbation that is associated with the observed frequency shifts is actually concentrated in the radial direction.
The frequency dependence of the shifts also depends on the spatial distribution of activity as was shown by, e.g., Kiefer & Roth (2018). Further, the spatial distribution of activity affects modes of different harmonic degree and azimuthal order differently (Moreno-Insertis & Solanki 2000).
Analysing the frequency shifts of the radial and dipole modes of KIC 8006161 (HD 173701), Thomas et al. (2019) found that the active regions for this star are at higher latitudes than in the solar case and are distributed over a wider range. We argue that any magnetic perturbation that is happening at a depth below the outer pressure scale height will eventually manifest in the near-surface layers. There it will then lead to frequency shifts that are larger than those caused by deeper seated perturbations (Gough & Thompson 1990;Kiefer & Roth 2018). Further, we are not concerned with the frequency dependence of the frequency shifts here, but focus on the full-cycle shift of the radial mode closest to ν max . The assumption of the source function with Eq. (4) appears to be maintainable in this regard and certainly results in a very good estimate of the expected level of the mode sensitivities and thus of the frequency shifts. Still, given the results of Salabert et al. (2018) and Thomas et al. (2019) we again stress the importance of more detailed investigations of frequency shifts as a function of mode frequency and of harmonic degree if the data allow for such analyses.

CONCLUSIONS
We computed the sensitivity of p-mode oscillations to magnetic activity for a set of evolutionary stellar models. For this, we used a standard MESA inlist and adjusted only the initial mass (from 0.7-3.0 M ⊙ ) and maximum time steps between models. We then used GYRE to compute p-mode eigenfunctions of all the models. The complete set of models was divided into six evolutionary stages. We found that modes are most sensitive to perturbations for main-sequence and subgiant stars. On the main sequence, sensitivity increases with higher mass. Lowest mode sensitivities are found for stars at the tip of the RGB.
In the calculation of the mode sensitivity S we assumed that the leading terms in the kernel functions of p modes  Karoff et al. (2013) and Salabert et al. (2016b). S ph : Mathur et al. (2014b); except KIC 8006161: García et al. (2014). Measured frequency shift δν meas from Santos et al. (2018). Solar values of log R ′ HK from Saar & Brandenburg (1999), S ph from Mathur et al. (2014b).
are proportional to divξ. We further assumed that the perturbations are concentrated within one pressure scale height below the photospheric radius of the models. Fits of polynomials in fundamental and widely available stellar parameters then gave relations for estimating these sensitivities.
In contrast to the relations for the mode sensitivity that have been used in the literature so far, when frequency shifts due to stellar activity were to be estimated, our relations are based on stellar models. The added flexibility of changing the exponents on the fundamental parameters in the polynomials between evolutionary stages certainly increases the capability of these relations to capture the true variation of the sensitivities through stellar evolution. The relation given by Karoff et al. (2009), which is based on derivations of Metcalfe et al. (2007), and the relation derived by Kiefer et al. (2019) are unable to reproduce the mode sensitivities of main-sequence stars and subgiant and lower RGB stars (which they were originally intended for) as well as the optimal relations presented here. In particular, the mass dependence of mode sensitivities and their change over time while the stars are on the main sequence is not well captured by these relations. For stars off the main sequence, these relations considerably overestimate mode sensitivities.
We used the optimal relation for the main-sequence and tested it on three stars. We found that it is important to use activity measures that are contemporaneous to the photometric data that are used to measure the p-modes whose shifts are to be predicted. If simple photometric activity indices are used, inclination of the stellar rotation axis can lead to an underestimation of the true level of activity and thus to underestimated shifts. Using the mean photometric activity index S ph , we find overall solid agreement between the predicted and observed frequency shifts for the three stars that we investigated.
The derivation of the mode sensitivities is done only for purely radial oscillations, which ensures that the modes are pure p modes. This is of particular importance in RGB stars, where, e.g., dipole modes, are often of mixed character, partly p mode and partly g mode. For non-radial modes, the calculation of the mode inertia and the kernel function would change, as the eigenfunctions include a horizontal part. It can be expected that mode sensitivities of mixed modes are weaker, as their mode inertia will have contributions from both the convective parts of the star (p mode) and the radiative part (g mode).
The reported relations and the presented mode sensitivities can also guide the selection of targets for future studies of activity related p-mode frequency shifts: Mode sensitivities are largest for earlier main-sequence stars at around ν max = 2000 µHz. Thus, in turn, frequency shifts can be expected to be largest for these stars. Further, subgiants in the range 400 µHz ν max 800 µHz show increased sensitivities and present good targets. Finally, we note that there appear several models with larger sensitivities in the upper RGB, core He burning, and the AGB stages. Such studiesoptimally including oscillating stars at various evolutionary stages -could also aim at testing our relations, given known activity levels, fundamental stellar parameters, and p-mode frequency shifts.
The cardinal question driving all of this is: how do stellar dynamos operate and in what way do they change along stellar evolution? Simple time resolved p-mode frequency measurements can play an important part in answering this.