Skip to content

Examples

João Faria edited this page Sep 16, 2020 · 8 revisions

kima comes with a few examples ready to run, showing some of the common use cases.
Here is the full list and below are some highlights.

51 Peg

Here we analyse RV data from the first exoplanet host.
The getting started guide goes into more detail on this example.

BL2009

In the /BL2009 example we analyse the simulated datasets created by Balan & Lahav (2009).
The folder contains two datasets with 1 and 2 simulated planets, which were used to test the ExoFit package.

The kima_setup.cpp file sets the main options for the model: we use a standard sum-of-Keplerians model (no GP) and no linear trend. The number of planets in the model is fixed to 1. Inside the RVmodel() constructor, we define the priors for the model parameters, the same as those used by Balan & Lahav (2009).

To compile and run, type

kima-run

You can play around with this example by setting the number of planets to 2 and reading the file BL2009_dataset2.kms.rv instead. Note that, with the priors defined by default, an alias period might show up in the posterior and the model will take a bit longer to converge.

CoRoT7

The /CoRoT7 example uses HARPS radial velocity measurements of the active star CoRoT-7.
This example reproduces the analysis done by Faria et al. (2016), where we successfully recovered both the orbits of CoRoT-7b and CoRot-7c, and the activity-induced signal.

In the kima_setup.ccp file, we set a GP model with hyperpriors and no linear trend. The number of planets is free, with a uniform prior between 0 and 5.

Note: in Faria et al. (2016) we considered a uniform prior for Np between 0 and 10.

To compile and run, type

kima-run

This example takes a considerably longer time to run because of the GP model.

Many Planets

The /many_planetsexample uses the radial velocity measurements of the star HD10180 where seven possible planetary signals were found by Lovis et al. (2011).

Here we also use the sum-of-Keplerians model, with no HARPS offset and no linear trend, but this time we consider hyperpriors for the orbital periods and semi-amplitudes. The number of planets is a free parameter in the MCMC, with a uniform prior between 0 and 10.

To compile and run, type

kima-run

multi_instrument

This example showcases the capability to analyse RVs from different instruments. See this page for more information.

activity_correlations

In this example, the model takes into account linear correlations with activity indicators. The first dataset (in the file simulated1.txt) is simulated to illustrate the point. We generated a fake activity indicator b given by a sinusoidal signal as a function of time. Then, the fake RVs were set to 0.8 * b. The data file contains four columns:

t   rv   error   b
... ...  ....    ...

Loading the data with

datafile = "simulated1.txt";
load(datafile, "ms", 4);

will not read the fourth column and fit the "RVs" as usual. A very significant planet signal will show up.

But loading the data with

datafile = "simulated1.txt";
indicators = {"b"};
load(datafile, "ms", 4, indicators);

will read the b column and set up the model such that a linear correlation RV vs b is included.
The coefficient (slope) of that linear correlation will be estimated together with the other parameters. Running kima with these options will reveal no significant planet signals, because the RVs are pure white noise when the linear correlation with b is subtracted. At the end, the coefficient will be estimated to be around 0.8, the value we had injected.

There is a slightly more complicated dataset (also simulated) in the file simulated2.txt which illustrates a linear correlation with a second activity indicator and how to skip a column.