Priors¶

Physical eccentricities

Prior to keep eccentricity between 0 and a specified upper limit.

Parameters
• num_planets (int or list) – Planets to apply the eccentricity prior. If an integer is given then all planets with indexes up to and including the specified integer will be included in the prior. If a list is given then the prior will only be applied to the specified planets.

• upperlims (float or list of floats) – List of eccentricity upper limits to assign to each of the planets. If a float is given then all planets must have eccentricities less then this value. If a list of floats is given then each planet can have a different eccentricity upper limit.

Gaussian prior

Guassian prior on a given parameter.

Parameters
• param (string) – parameter label

• mu (float) – center of Gaussian prior

• sigma (float) – width of Gaussian prior

Prior for hard boundaries

This prior allows for hard boundaries to be established for a given parameter.

Parameters
• param (string) – parameter label

• minval (float) – minimum allowed value

• maxval (float) – maximum allowed value

Informative baseline prior suggested by A. Vanderburg (see Blunt et al. 2019).

This prior follows the distribution:

\begin{align}\begin{aligned}p(x) \propto 1\, \mathrm{{if}}\, x-t_{{d}} \lt B\\ \propto (B+t_{{d}})/x\, \mathrm{{else}}\end{aligned}\end{align}

with upper bound.

Parameters
• param (string) – parameter label

• baseline (float) – $$B$$ in eq above

• duration (float) – $$t_{{d}}$$ in eq above (default: 0.0)

Jeffrey’s prior

This prior follows the distribution:

$p(x) \propto \frac{1}{x}$

with upper and lower bounds to prevent singularity at $$x=0$$.

Parameters
• param (string) – parameter label

• minval (float) – minimum allowed value

• maxval (float) – maximum allowed value

Modified Jeffry’s prior

This prior follows the distribution:

$p(x) \propto \frac{1}{x-x_0}$

with upper bound.

Parameters
• param (string) – parameter label

• kneeval (float) – “knee” of Jeffrey’s prior ($$x_0$$ in eq above)

• minval (float) – minimum allowed value. minval must be larger than kneeval

• maxval (float) – maximum allowed value

Prior defined by an input array of values

Wrapper for scipy.stats.gaussian_kde.

This prior uses Gaussian Kernel Density Estimation to estimate the probability density function from which a set of values are randomly drawn.

Useful for defining a prior given a posterior obtained from a complementary fitting process. For example, you might use transit data to obtain constraints on secosw and sesinw, then use the posterior on secosw as a prior for a RadVel fit.

Parameters
• param_list (list of str) – list of parameter label(s).

• values (numpy array of float) – values of param you wish to use to define this prior. For example, this might be a posterior array of values of secosw derived from transit data. In case of univariate data this is a 1-D array, otherwise a 2-D array with shape (# of elements in param_list, # of data points).

• bw_method (str, scalar, or callable [optional]) – see scipy.stats.gaussian_kde

Note: the larger the input array of values, the longer it will take for calls to this prior to be evaluated. Consider thinning large input arrays to speed up performance.

K must be positive

A prior to prevent K going negative. Be careful with this as it can introduce a bias to larger K values.

Parameters

num_planets (int) – Number of planets. Used to ensure K for each planet is positive

Secondary eclipse prior

Implied prior on eccentricity and omega by specifying measured secondary eclipse time

Parameters
• planet_num (int) – Number of planet with measured secondary eclipse

• ts (float) – Secondary eclipse midpoint time. Should be in the same units as the timestamps of your data.

• ts_err (float) – Uncertainty on secondary eclipse time

Interface for user to define a prior

with an arbitrary functional form.

Parameters
• param_list (list of str) – list of parameter label(s).

• func (function) – a Python function that takes in a list of values (ordered as in param_list), and returns the corresponding log-value of a pdf.

• tex_rep (str) – TeX-readable string representation of this prior, to be passed into radvel report and plotting code.

Example

>>> def myPriorFunc(inp_list):
...     if inp_list[0] > 0. and inp_list[0] < 1.:
...         return 0.
...     else:
...         return -np.inf
>>> myTexString = 'Uniform Prior on $\sqrt{e}$'
>>> myPrior = radvel.prior.UserDefinedPrior(['se'], myPriorFunc, myTexString)


Note

func must be properly normalized; i.e. integrating over the entire parameter space must give a probability of 1.