nespinoza / juliet

A versatile modelling tool for transiting and non-transiting (single and multiple) exoplanetary systems
MIT License
55 stars 30 forks source link

Modified LogUniform/Jeffrey's Prior? #91

Open ThomasGWilson opened 1 year ago

ThomasGWilson commented 1 year ago

Hi Néstor,

In some of the parameterisation of RV analysis (notably semi-amplitude) it can be beneficial to set the distribution to LogUniform/Jeffrey's to avoid over-estimating the final value by better sampling low values compared to a Uniform distribution. However, this can cause an under-estimation by the same logic.

A good compromise can be the Modified LogUniform/Jeffrey's (https://github.com/j-faria/LogUniform/blob/caed56d92eed0bd9398c11eb88ce2476077a6ffa/loguniform/LogUniform.py#L214) which is parameterised by a "knee" value in which the distribution switches from Uniform to LogUniform/Jeffrey's, and an upper bound.

This appears to work well within the Kima package and I was wondering if you've thought of adding it to Juliet?

Cheers,

Tom

nespinoza commented 1 year ago

Hi @ThomasGWilson,

Indeed, this prior is great and it has already been implemented in juliet by @JohannesBuchner:

https://github.com/nespinoza/juliet/blob/75d54a61d64b38e048ca68894e8238666d249d39/juliet/utils.py#L281

This was done a while ago (3 years ago!), but I totally forgot to update the documentation on it. I'll mark this as something I need to include in the docs.

For reference, the usage is as follows:

Néstor

ThomasGWilson commented 1 year ago

Hi @nespinoza,

That's great! Thanks and thanks to @JohannesBuchner for preempting my problem by three years!

Cheers, Tom