nespinoza / juliet

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

Omega forced to be positive #90

Closed LucaNap closed 1 year ago

LucaNap commented 1 year ago

Recently, I had an issue where "omega_p#" wasn't being added to the posteriors file. Apparently the culprit are the following lines in utils.py:

idx = np.where(omega > 0.)[0]
val, valup, valdown = get_quantiles(omega[idx])

While my planet's omega was never going above 0, so the function resulted in no values at all. Shouldn't omega be defined between -180 and 180, as indicated in Eastmanl 2013 (and as suggested by the conversion factor 180/np.pi) ? Isn't this causing any omega output to be plain wrong ?

P.S. I am using the "sesinomega, secosomega" parametrization.

nespinoza commented 1 year ago

Hey @LucaNap --- sorry for not taking a look at this earlier. This indeed seems like a bug. I'll take a look a this!

LucaNap commented 1 year ago

Thank you @nespinoza . This bug is still standing, and it's very annoying because sometimes the fit ends up with a negative omega, so omega[idx] fails and the fit function comes up with an error.

nespinoza commented 1 year ago

Hi @LucaNap,

I just fixed this in the latest juliet version --- v.2.2.4. Can you please try upgrading and checking this works there? Namely, do pip install juliet --upgrade, and check your posteriors.dat.

Will wait until your confirmation before closing this!

N.

LucaNap commented 1 year ago

Unfortunately I don't remember which target I was testing last year; but the code looks ok! I'll let you know if I find any issues on this topic in the future. Thanks!

nespinoza commented 1 year ago

Solved in v.2.2.4