asterion.priors#

Prior models.

Module Contents#

class AsyFunction(delta_nu, epsilon=None)[source]#

Bases: Prior

Prior on the linear asymptotic function \(f\), where \(f(n) = \Delta\nu (n + \epsilon)\).

Parameters
  • delta_nu (dist_like) – Prior for the large frequency separation \(\Delta\nu\). Pass either the arguments of dist.Normal, or a dist.Distribution.

  • epsilon (dist_like) – Prior for the phase term \(\epsilon\). Pass either the arguments of dist.LogNormal, or a dist.Distribution. Defaults to (np.log(1.4), 0.4).

delta_nu#

The distribution for \(\Delta\nu\).

Type

numpyro.distributions.distribution.Distribution

epsilon#

The distribution for \(\epsilon\).

Type

numpyro.distributions.distribution.Distribution

class CZGlitchFunction(nu_max, log_tau, phi=None)[source]#

Bases: _GlitchFunction

Prior on the base of the convective zone glitch function \(f\), where \(f(\nu) = a_\mathrm{CZ} \nu^{-2} \sin(4\pi\tau_\mathrm{CZ}\nu + \phi_\mathrm{CZ})\)

The priors for the glitch parameters \(a_\mathrm{He},b_\mathrm{He},\tau_\mathrm{He}\) are inferred from that of the frequency at maximum power, \(\nu_\max\) using scaling relations derived from stellar models (Lyttle et al. in prep.).

Parameters
  • nu_max (dist_like) – The prior for the frequency at maximum power, \(\nu_\max\). Pass either the arguments of dist.Normal or a dist.Distribution.

  • log_tau (dist_like) – The prior for the acoustic depth of the glitch, \(\tau_\mathrm{BCZ}\). Pass either the arguments of dist.Normal, or a dist.Distribution.

  • phi (dist_like) – The prior for the phase of the glitch, \(\phi_\mathrm{BCZ}\). Pass either the arguments of dist.Uniform, or a dist.Distribution.

log_a#

The distribution for the glitch amplitude parameter \(\log a_\mathrm{BCZ}\)

Type

numpyro.distributions.distribution.Distribution

log_tau#

The distribution for \(\log\tau_\mathrm{BCZ}\).

Type

numpyro.distributions.distribution.Distribution

phi#

The distribution for \(\phi_\mathrm{BCZ}\).

Type

numpyro.distributions.distribution.Distribution

amplitude(self, nu)[source]#

The amplitude of the glitch, \(a_\mathrm{CZ} / \nu^{-2}\).

Parameters

nu (array_like) – Mode frequency, \(\nu\).

Returns

Base of the convective zone glitch amplitude.

Return type

jax.numpy.ndarray

class HeGlitchFunction(nu_max, log_tau, phi=None)[source]#

Bases: _GlitchFunction

Prior on the second ionisation of helium glitch function \(f\), where \(f(\nu) = a_\mathrm{He} \nu \exp(-b_\mathrm{He} \nu^2) \sin(4\pi\tau_\mathrm{He}\nu + \phi_\mathrm{He})\).

The priors for the glitch parameters \(a_\mathrm{He},b_\mathrm{He},\tau_\mathrm{He}\) are inferred from that of the frequency at maximum power, \(\nu_\max\) using scaling relations derived from stellar models (Lyttle et al. in prep.).

Parameters
  • nu_max (dist_like) – The prior for the frequency at maximum power, \(\nu_\max\). Pass either the arguments of dist.Normal, or a dist.Distribution.

  • log_tau (dist_like) – The prior for the acoustic depth of the glitch, \(\tau_\mathrm{He}\). Pass either the arguments of dist.Normal, or a dist.Distribution.

  • phi (dist_like) – The prior for the phase of the glitch, \(\phi_\mathrm{He}\). Pass either the arguments of dist.Uniform, or a dist.Distribution.

log_a#

The distribution for the glitch amplitude parameter \(\log a_\mathrm{He}\).

Type

numpyro.distributions.distribution.Distribution

log_b#

The distribution for the glitch decay parameter \(\log b_\mathrm{He}\).

Type

numpyro.distributions.distribution.Distribution

log_tau#

The distribution for \(\log\tau_\mathrm{He}\).

Type

numpyro.distributions.distribution.Distribution

phi#

The distribution for \(\phi_\mathrm{He}\).

Type

numpyro.distributions.distribution.Distribution

amplitude(self, nu)[source]#

The amplitude of the glitch, \(a_\\mathrm{He} \\nu \\exp(-b_\\mathrm{He} \\nu^2)\).

Parameters

nu (array_like) – Mode frequency, \(\\nu\).

Returns

Helium glitch amplitude.

Return type

jax.numpy.ndarray

class Prior(*args, **kwargs)[source]#

Prior class.

A prior is a model which returns a parameter or function when called and has no observed sample sites.

Parameters
  • *args – Positional arguments to display in the object representation.

  • **kwargs – Keyword arguments to display in the object representation.

symbols#

Dictionary mapping model variable names to their mathematical symbols.

Type

dict

units#

Dictionary mapping model variable names to their units.

Type

dict

class TauPrior(nu_max, teff=None, noise=0.005)[source]#

Bases: Prior

Prior on the acoustic depths of helium and BCZ glitches.

Parameters
  • nu_max (dist_like) – Frequency at maximum power (uHz).

  • teff (dist_like) – Effective temperature (K).

class ZerosFunction[source]#

Bases: Prior

A prior on the zeros function \(f\) where \(f(\boldsymbol{x}) = \boldsymbol{0}\).