juliet icon indicating copy to clipboard operation
juliet copied to clipboard

Modified LogUniform/Jeffrey's Prior?

Open ThomasGWilson opened this issue 2 years ago • 2 comments

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

ThomasGWilson avatar Feb 14 '23 10:02 ThomasGWilson

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:

  • Name of the prior: modjeffreys
  • Parameters: turn (value below which prior is uniform), b (maximum value of the prior)

Usage in a juliet-like, prior.dat file for fitting, e.g., the RV semi-amplitude:

K_p1 modjeffreys 1,100

here, turn = 1 and b = 100. Let me know if this makes sense!

Néstor

nespinoza avatar Feb 15 '23 14:02 nespinoza

Hi @nespinoza,

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

Cheers, Tom

ThomasGWilson avatar Feb 16 '23 13:02 ThomasGWilson