California-Planet-Search / radvel

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

Negative Tc value clarification #304

Closed zhexingli closed 4 years ago

zhexingli commented 4 years ago

What exactly are the negative Tc values subtracted from after running mcmc? For my run, the result shows: parameter value +/- vary per1 4.31155 0.00017 True tc1 -1005.76 0.076 True e1 0.176393 0.055 True w1 -3.22584 0.39 True k1 1.93535 0.13 True per2 9.62223 0.00072 True tc2 -999.542 0.1 True e2 0.0170406 0.028 True w2 1.71327 8300 True k2 2.29216 0.12 True per3 20.4202 0.0041 True tc3 -601.475 0.25 True e3 0.0511273 0.041 True w3 -4.14777 9200 True k3 2.18787 0.13 True dvdt 0 0 False curv 0 0 False gamma_HARPS -0.231763 0.091 True jit_HARPS 1.53443 0.072 True tp1 -1004.98 0.25
tp2 -999.331 2.8
tp3 -599.812 4.9

Note Tc1, Tc2, and Tc3 are all negative. Is the -1005 for Tc1 and similarly for other Tc's subtracted from the base time set in the setup file, or is it subtracted from the user-provided prior Tc? This appears to be strange to me if it is subtracted from the base time. Because in this case, my base time bjd0 is 2450000, for Tc1 the prior is 2454499.5 (similar values for other Tc), and in the final result pdf the Tc shows to be similar to my given input as well. Could someone clarify a bit for me please? Thanks.

bjfultn commented 4 years ago

The time_base parameter should be subtracted in the printed output. It isn't subtracted anywhere else except that printed output and the x-axis of the RV plot.

zhexingli commented 4 years ago

So if the time_base is 2450000 and the output is -1000, that means the Tc returned is 2449000? In this case, I limit the Tc with a gaussian prior centered on 2454499.5 with sigma of 0.11 days. The output returned Tc of -1005.76 but then the final result summary pdf gives Tc 2454499.5, just like my input. Why so much difference between the command line output and that in the summary pdf? Just curious.

bjfultn commented 4 years ago

I don't think there should be such a large difference. Are you comparing the command line output to the "maximum likelihood" value in the report or the median from the MCMC.

zhexingli commented 4 years ago

I'm surprised by this too.. Yes I'm comparing the command line output to the maximum likelihood and the credible interval values in the report. The two values in the report returned similar values of 2454499.5 but the command line returned something like -1000. I'm attaching the two screenshots here. image image

bjfultn commented 4 years ago

Could you attach the setup file?

zhexingli commented 4 years ago

Yup, attached is my setup file. I have to compress it for github to accept here. HD40307.py.zip

bjfultn commented 4 years ago

You have time_base set to time_base = np.mean([np.min(data.time), np.max(data.time)]). Note that time_base is distinct from bjd0. time_base is used as the reference epoch for dvdt and curv and in the printed output of the posterior. bjd0 is only used for the x-axis of the multi panel plot.

zhexingli commented 4 years ago

Oh I see! Thx BJ. I feel embrassed right now to get these two mistaken after using radvel for so long....

bjfultn commented 4 years ago

No worries, that is definitely confusing.