The Table class

Bioverse uses the Table class to manage large simulated datasets across the code. Each row in the Table corresponds to a different simulated planet, while each column corresponds to a planetary parameter. Generally, rows correspond to indices while columns correspond to string keys. Some examples for selecting data in a table:

# Returns semi-major axis for every planet
table['a']

# Returns the mass of the tenth planet
table['M'][9]

# Returns all parameters for the first 50 planets
table[:50]

A Table is somewhat similar to a Pandas DataFrame. Indeed, if Pandas is installed, the Table will be displayed as one. To export a Table as a Pandas DataFrame, we can use the to_pandas() method:

table.to_pandas()

          d      M_st      R_st      L_st   T_eff_st SpT  ...  N_pl  order         R            P         a           S
0    13.779  0.891276  0.912031  0.668409  5469.6313   G  ...     1      0  2.279597   680.071360  1.456531    0.315067
1    17.990  1.368140  1.285004  2.995380  6704.4496   F  ...     1      0  1.603131  4461.320947  5.887965    0.086402
2    21.648  1.384050  1.296945  3.119100  6741.3827   F  ...     1      0  3.114289    13.869061  0.125901  196.776529
3    17.565  0.892344  0.912906  0.671218  5472.7466   G  ...     1      0  1.246218   303.569497  0.851064    0.926700
4     3.563  0.397945  0.478474  0.039754  3729.2254   M  ...     4      0  2.560260   645.564506  1.075260    0.034384
..      ...       ...       ...       ...        ...  ..  ...   ...    ...       ...          ...       ...         ...
517   5.905  0.353798  0.435516  0.026342  3526.6437   M  ...     5      2  2.587812   128.221803  0.351970    0.212635
518   5.905  0.353798  0.435516  0.026342  3526.6437   M  ...     5      3  0.802393   165.421708  0.417119    0.151400
519   5.905  0.353798  0.435516  0.026342  3526.6437   M  ...     5      4  5.704183   311.476887  0.636036    0.065115
520  10.908  0.763220  0.805601  0.388396  5081.1400   K  ...     2      0  1.343379  1518.340450  2.362701    0.069576
521  10.908  0.763220  0.805601  0.388396  5081.1400   K  ...     2      1  0.513268    30.733272  0.175483   12.612595

[522 rows x 22 columns]

Each planet or stellar property is referred to throughout Bioverse by a unique string key. This formalism allows properties to be easily accessed across the code. The keys are not formally defined anywhere in the code, so creating a new property is as simple as adding it to a Table of planets:

# Assigns a random ocean covering fraction to every planet in the Table
table['f_ocean'] = np.random.uniform(0, 1, len(t))

This new column must have the same length as others in the Table. Some other examples of Table usage:

# Change the value of `f_ocean` to zero for planets that are not exo-Earth candidates
EEC = table['EEC'] # boolean array
table['f_ocean'][~EEC] = 0.

# Calculate planet densities in g/cm3
table['rho'] = 5.51 * table['M'] / table['R']**3

# List the definition of all keys in the table (found in legend.dat)
table.legend()

# Append one table to another in-place
table.append(table2, inplace=True)

See the Table documentation for a full list of its methods.

List of properties

The following table lists all keys currently used in Bioverse and the properties they correspond to:

Key

Data type

Description

star_name

str

Name of star

simulated

bool

Is this system simulated?

d

float

Distance to star (pc)

x

float

Cartesian x position (pc)

y

float

Cartesian y position (pc)

z

float

Cartesian z position (pc)

ra

float

Right ascension (deg)

dec

float

Declination (deg)

binary

bool

Is it a binary star?

M_st

float

Stellar mass (solar mass)

T_eff_st

float

Effective temperature (K)

R_st

float

Stellar radius (solar radius)

logL

float

Bolometric luminosity (log solar luminosity)

L_st

float

Bolometric luminosity (solar luminosity)

M_G

float

Gaia G-band absolute magnitude

SpT

str

Approximate spectral type (e.g. M)

subSpT

str

Full spectral type (e.g. M5V)

age

float

Age (Gyr)

N_pl

int

Number of planets in system

coplanar

bool

Is the system coplanar?

cos(i)_st

float

cosine of mean system inclination

P_in

float

Period of innermost planet (d)

R_typical

float

Radius of innermost planet (Earth radius)

N_EEC

int

Number of exo-Earth candidates in system

planetID

int

Unique index for this planet

starID

int

Unique index of this planet’s host star

order

int

Order of planet from the star

planet_name

str

Name of planet

age_pl

float

Age (Gyr)

cos(i)

float

Cosine of orbital inclination

d_inc

float

Angle between the planet’s orbital plane and the mean system orbital plane

P

float

Orbital period (d)

Ratio

float

Period ratio versus the next planet in

R

float

Radius (Earth radius)

a

float

Semi-major axis (AU)

S

float

Instellation (Earth insolation)

S_abs

float

Instellation (W/m2)

e

float

Eccentricity

M0

float

Mean anomaly at reference time (radians)

w_LAN

float

Longitude of ascending node (radians)

w_AP

float

Longitude of periapsis (radians)

nu

float

True anomaly (radians)

b

float

Impact parameter on stellar disk

transiting

bool

Does the planet transit its star?

T_dur

float

Transit duration (d)

M

float

Mass (Earth mass)

rho

float

Density (g/cm3)

g

float

Surface gravity (cm/s2)

class1

str

instellation-based classification

class2

str

Size-based classification

a0

float

Mean distance from star (AU)

zone

str

Location in system

type

str

Corresponding Solar System template

EEC

bool

Is this planet an exo-Earth candidate?

habitable

bool

Is this planet habitable?

life

bool

Is this planet inhabited?

mu

float

Atmospheric mean molecular weight (u)

H

float

Atmospheric scale height

pCO2

float

Abudance of CO2 (log)

pN2

float

Abundance of N2 (log)

T_eq

float

Equilibrium temperature (K)

T_atm

float

Mean atmospheric temperature (K)

separation

float

Maximum angular separation of the planet from the star

logcontrast

float

Planet-to-star contrast ratio

depth

float

Transit depth corresponding to the planet’s radius

atmosphere_depth

float

Transit depth corresponding to the atmospheric scale height

a_inner

float

Inner edge of the habitable zone (AU)

a_outer

float

Outer edge of the habitable zone (AU)

S_inner

float

Inner edge of the habitable zone (Earth insolation)

S_outer

float

Outer edge of the habitable zone (Earth insolation)

has_H2O

bool

Does the planet have atmospheric water vapor?

has_O2

bool

Does the planet have atmospheric O2 (or O3)?

A_g

float

Geometric albedo

contrast

float

Planet-to-star contrast ratio

a_eff

float

Semi-major axis scaled to the Sun’s luminosity (AU)

R_eff

float

Estimated radius assuming Earth’s geometric albedo (Earth radius)

true_sep

float

True planet-star separation at a given ephemeris (AU)

phase_angle

float

Planet illumination phase angle (radians)

ang_sep_mas

float

Planet-star angular separation (milliarcseconds)