reggae.asymptotic ================= .. py:module:: reggae.asymptotic Classes ------- .. autoapisummary:: reggae.asymptotic.asymptotic Module Contents --------------- .. py:class:: asymptotic .. py:method:: _pair(nu0, h, w, d02) Define a pair as the sum of two Lorentzians. A pair is assumed to consist of an l=0 and an l=2 mode. The widths are assumed to be identical, and the height of the l=2 mode is scaled relative to that of the l=0 mode. The frequency of the l=2 mode is the l=0 frequency minus the small separation. Parameters ---------- nu0 : float Frequency of the l=0 (muHz). h : float Height of the l=0 (SNR). w : float The mode width (identical for l=2 and l=0) (log10(muHz)). d02 : float The small separation (muHz). Returns ------- pair_model : array The SNR as a function of frequency of a mode pair. .. py:method:: _lor(nu0, h, w) Lorentzian to describe a mode. Parameters ---------- nu0 : float Frequency of lorentzian (muHz). h : float Height of the lorentizan (SNR). w : float Full width of the lorentzian (muHz). Returns ------- mode : ndarray The SNR as a function frequency for a lorentzian. .. py:method:: _get_nmax(dnu, numax, eps) Compute radial order at numax. Compute the radial order at numax, which in this implimentation of the asymptotic relation is not necessarily integer. Parameters ---------- numax : float Frequency of maximum power of the p-mode envelope (muHz). dnu : float Large separation of l=0 modes (muHz). eps : float Epsilon phase term in asymptotic relation. Returns ------- nmax : float non-integer radial order of maximum power of the p-mode envelope .. py:method:: _get_n_p(nmax) Compute radial order numbers. Get the enns that will be included in the asymptotic relation fit. These are all integer. Parameters ---------- nmax : float Frequency of maximum power of the p-mode envelope. norders : int Total number of radial orders to consider. Returns ------- enns : ndarray Numpy array of norders radial orders (integers) around nu_max (nmax). .. py:method:: _P_envelope(nu, hmax, numax, width) Power of the seismic p-mode envelope Computes the power at frequency nu in the p-mode envelope from a Gaussian distribution. Used for computing mode heights. Parameters ---------- nu : float Frequency (muHz). hmax : float Height of p-mode envelope (SNR). numax : float Frequency of maximum power of the p-mode envelope (muHz). width : float Width of the p-mode envelope (muHz). Returns ------- h : float Power at frequency nu (SNR) .. py:method:: _get_freq_range(numax) Get frequency range around numax for model Returns a boolean array corresponding to the frequency bins that span the p-mode envelope. The range is set to be -/+ Dnu from the lowest/heighest radial order. Parameters ---------- numax : float Frequency of maximum power of the p-mode envelope (muHz). Returns ------- idx : bool Boolean array pick out the frequency range of the p-mode envelope. .. py:method:: _asymptotic_relation(numax, dnu, eps, alpha) Compute the l=0 mode frequencies from the asymptotic relation for p-modes Parameters ---------- numax : float Frequency of maximum power of the p-mode envelope (muHz). dnu : float Large separation of l=0 modes (muHz). eps : float Epsilon phase term in asymptotic relation (unitless). alpha : float Curvature factor of l=0 ridge (second order term, unitless). Returns ------- nu0s : ndarray Array of l=0 mode frequencies from the asymptotic relation (muHz). .. py:method:: asymptotic_model(theta_asy) Constructs a spectrum model from the asymptotic relation. The asymptotic relation for p-modes with angular degree, l=0, is defined as: $nu_nl = (n + \epsilon + lpha/2(n - nmax)^2) * \log{dnu}$ , where nmax = numax / dnu - epsilon. We separate the l=0 and l=2 modes by the small separation d02. Parameters ---------- dnu : float Large separation log10(muHz) lognumax : float Frequency of maximum power of the p-mode envelope log10(muHz) eps : float Phase term of the asymptotic relation (unitless) alpha : float Curvature of the asymptotic relation log10(unitless) d02 : float Small separation log10(muHz) loghmax : float Gaussian height of p-mode envelope log10(SNR) logenvwidth : float Gaussian width of the p-mode envelope log10(muHz) logmodewidth : float Width of the modes (log10(muHz)) *args : array-like List of additional parameters (Teff, bp_rp) that aren't actually used to construct the spectrum model, but just for evaluating the prior. Returns ------- model : ndarray spectrum model around the p-mode envelope