EPOS API

This generates the API, showing some documented functions

(this is a link to EPOS.epos)

The epos class

class EPOS.epos(name, RV=False, Debug=False, seed=True, Norm=False, MC=True, Msini=False)

The epos class

Description:
Initialize
Parameters:
  • name (str) – name to use for directories
  • RV (bool) – Compare to radial velocity instead of transits
  • Debug (bool) – Log more output for debugging
  • seed (int) – Same random number for each simulation? True, None, or int
  • Norm (bool) – normalize pdf (deprecated?)
name

str – name

plotdir

str – plot directory

RV

bool – Compare to Radial Velocity instead of transit data

Multi

bool – Do multi-planet statistics

RandomPairing

bool – multis are randomly paired

Isotropic

bool – Assume isotropic mutual inclinations

Parametric

bool – parametric planet population?

Debug

bool – Verbose logging

seed

Random seed, can be any of int, True, or None

jsondir = None

EPOS mode

name = None

Directories

set_bins(xbins=[[1, 10]], ybins=[[1, 10]], xgrid=None, ygrid=None, Grid=False)

Initialize period-radius (or mass) bins for occurrence rate calculations

Description:
Bins can be generated from a grid, f.e. xgrid=[1,10,100], or from a list of bin edges, f.e. xbins= [[1,10],[10,100]]
Parameters:
  • xbins (list) – (list of) period bin edges
  • ybins (list) – (list of) radius/mass bin edges
  • xgrid (list) – period bin in interfaces
  • ygrid (list) – radius/mas bin interfaces
  • Grid (bool) – If true, create a 2D grid from bins: nbins = nx * ny. If false, pair x and y bins: nbins == nx == ny
set_observation(xvar, yvar, starID, nstars=168620.0, radiusError=0.1)

Observed planet population

Parameters:
  • xvar – planet orbital period [list]
  • yvar – planet radius or M sin i [list]
  • ID – planet ID [list]
  • nstars – number of stars surveyed

Note

Some pre-defined planet populations from Kepler can be generated from EPOS.kepler.dr25()

set_parametric(func)

Define a parametric function to generate the planet size-period distribution

Description:
Function should be callable as func(X, Y, *fitpars2d) with X(np.array): period Y(np.array): size (radius or mass) The list of fit parameters fitpars2d will be constructed from parameters added using EPOS.fitparameters.add() with is2D=True

Note

Some pre-defined functions can be found in EPOS.fitfunctions

Parameters:func (function) – callable function
set_survey(xvar, yvar, eff_2D, Rstar=1.0, Mstar=1.0, vet_2D=None)

Survey detection efficiency (completeness) :param xvar: planet orbital period grid [list]’ :param yvar: planet radius or M sin i grid [list] :param eff_2D: 2D matrix of detection efficiency :param Rstar: stellar radius, for calculating transit probability :param Mstar: stellar mass, for period-semimajor axis conversion

Note

Some pre-defined detection efficiencies from Kepler can be generated from EPOS.kepler

class EPOS.fitparameters

Holds the fit parameters. Usually initialized in epos.fitpars

add(key, value, fixed=False, min=-inf, max=inf, dx=None, text=None, is2D=False, isnorm=False)

Add a fit parameter

Parameters:
  • key (str) – fit parameter dictionary key
  • value (float) – starting guess
  • fixed (bool) – keep this parameter fixed
  • min (float) – lower bound
  • max (float) – upper bound
  • dx (float) – initial dispersion for MCMC
  • text (str) – plot safe name?
  • is2D (bool) – use this parameter in the 2D parametric EPOS.fitfunctions()
  • isnorm (bool) – this parameter is the normalization factor for the number of planet per star EPOS.fitfunctions()

Fit parameters

class EPOS.fitparameters

Holds the fit parameters. Usually initialized in epos.fitpars

add(key, value, fixed=False, min=-inf, max=inf, dx=None, text=None, is2D=False, isnorm=False)

Add a fit parameter

Parameters:
  • key (str) – fit parameter dictionary key
  • value (float) – starting guess
  • fixed (bool) – keep this parameter fixed
  • min (float) – lower bound
  • max (float) – upper bound
  • dx (float) – initial dispersion for MCMC
  • text (str) – plot safe name?
  • is2D (bool) – use this parameter in the 2D parametric EPOS.fitfunctions()
  • isnorm (bool) – this parameter is the normalization factor for the number of planet per star EPOS.fitfunctions()