j-faria / kima

Exoplanet detection in RVs with DNest4 and GPs
http://www.kima.science
MIT License
15 stars 10 forks source link

quadratic (and cubic?) trend #60

Closed j-faria closed 3 years ago

j-faria commented 4 years ago

Allow for quadratic (and maybe cubic) trends

j-faria commented 4 years ago

Standard Gaussian priors should work most times, but not always. Maybe go back to Data.topslope()?

j-faria commented 4 years ago

Default priors are Gaussian with mean 0 and sigma 10^m, where m is the order of magnitude of the coefficient, as supported by the data:

(int) round( log10( get_RV_span() / pow(get_timespan(), degree) ) );
j-faria commented 4 years ago

About the default linear trend option. The behaviour now is

with

const bool trend = true;
const int degree = 0;

the code throws a std::logic_error with message

trend=true but degree=0, what gives?

but note that

const bool trend = false;
const int degree = 1;

will compile and run, without the trend.

When degree is larger than 3, there is another std::logic_error saying

can't go higher than 3rd degree trends