Getting started
Data, models, and results¶
To get started, read in a dataset and choose one of the available models:
import kima
from kima import RVData, RVmodel
data = RVData('my_dataset')
model = RVmodel(fix=True, npmax=1, data=data)
and then run the model
The resulting posteriors can be loaded and analysed easily (more information here)
Running the examples¶
kima comes packed with ready-to-run examples. All of them are described to some length here.
Finding 51 Peg b¶
One of the examples involves the detection of 51 Peg b in Keck/HIRES data. Running it is as simple as
- This will run kima for 5000 steps, taking a few seconds.
and the results object provides a number of useful plots
res.plot_posterior_np() #(1)
res.plot_posterior_periods() #(2)
p = res.maximum_likelihood_sample() #(3)
res.phase_plot(p) #(4)
- shows the posterior for the number of planets
- shows the posterior for the orbital period, with a clear peak at 4.23 days
- select the sample with the maximum likelihood value
- plot the maximum likelihood solution in phase