California-Planet-Search / radvel

General Toolkit for Modeling Radial Velocity Data
http://radvel.readthedocs.io
MIT License
58 stars 52 forks source link

My fit does not match the "Example Fit" Docs #164

Closed smmills closed 6 years ago

smmills commented 6 years ago

After a fresh 1.1.7 radvel install, I run the first two commands from the "Example Fit" Docs:

$ radvel fit -s HD164922.py 
HD164922.py
Performing max-likelihood fitting for HD164922
Initial loglikelihood = -1184.115772
Performing maximum likelihood fit...
Final loglikelihood = -1151.224309
Best-fit parameters:
parameter                     value      vary
per1                        1206.91       True
per2                        75.8229       True
tc1                         6767.54       True
tc2                         5748.17       True
dvdt                              0      False
curv                              0      False
gamma_k                 2.95379e-06       True
gamma_j                     1.00078       True
gamma_a                 2.44594e-06       True
jit_k                       2.60145       True
jit_j                       2.71649       True
jit_a                        2.6011       True
secosw1                 6.12543e-18       True
sesinw1                    0.100057       True
logk1                       2.29836       True
secosw2                 6.12805e-18       True
sesinw2                    0.100048       True
logk2                   8.46003e-07       True
tp1                         6767.54           
e1                        0.0100114           
w1                           1.5708           
k1                          9.95787           
tp2                         5748.17           
e2                        0.0100096           
w2                           1.5708           
k2                                1           

Priors
------
e1 constrained to be < 0.99
e2 constrained to be < 0.99
Gaussian prior on tc1, mu=2456779.0, sigma=300.0
Bounded prior on jit_k, min=0.0, max=10.0
Bounded prior on jit_j, min=0.0, max=10.0
Bounded prior on jit_a, min=0.0, max=10.0

$ radvel plot -t rv -s HD164922.py
HD164922.py
Creating rv plot for HD164922
RV multi-panel plot saved to ./HD164922/HD164922_rv_multipanel.pdf

However, my plot does not look like the example. My fit has much different eccentricity:

HD164922_rv_multipanel.pdf

Why is this?

bjfultn commented 6 years ago

Ok, this appears to be a difference between the Powell and Nelder-Mead minimization methods in the MAP fitting routine. If I remember correctly we switched to Nelder-Mead because @sblunt was having trouble with the MAP fits when using GPs. @sblunt could you check that this is still the case? I think you found this issue back when the GPs weren't being properly updated anyways.

sblunt commented 6 years ago

Yes, we switched to Nelder-Mead because the Powell minimization was taking large steps and not converging to reasonable solutions for my example GP cases. The default max-likelihood fit is still Nelder-Mead (see radvel.fitting.maxlike_fitting). Does that answer your question @bjfultn?

bjfultn commented 6 years ago

We are switching back to the Powell minimizer as the default in v1.1.8. See pull request #168