California-Planet-Search / radvel

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

Plotting derived parameters error #342

Closed zhexingli closed 3 years ago

zhexingli commented 3 years ago

Hello,

Radvel returned the following error message when I was trying to plot the corner plot for the derived parameters:

Creating derived plot for HD44594_radvel Traceback (most recent call last): File "/Users/ZhexingLi/anaconda/bin/radvel", line 8, in sys.exit(main()) File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/radvel/cli.py", line 197, in main args.func(args) File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/radvel/driver.py", line 127, in plots Derived.plot() File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/radvel/plot/mcmc_plots.py", line 244, in plot show_titles=True, title_kwargs={"fontsize": 14}, smooth=True File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/corner/corner.py", line 219, in corner wspace=whspace, hspace=whspace) File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/matplotlib/figure.py", line 2235, in subplots_adjust self.subplotpars.update(left, bottom, right, top, wspace, hspace) File "/Users/ZhexingLi/anaconda/lib/python3.6/site-packages/matplotlib/figure.py", line 229, in update raise ValueError('left cannot be >= right')

This is the first time I'm running into this error. I'm using version 1.4.2. The command before this "radvel derive -s filename" worked fine and didn't return any error. In the summary pdf, neither the corner plot nor the derived planetary parameters (mpsini, semi-major axis) were shown.

bjfultn commented 3 years ago

Hmm, this is a new one that is coming from the corner package. Do you happen to have an abnormally large number of free parameters for this fit? Were the derived parameters calculated? There should be a csv file.

zhexingli commented 3 years ago

Hi BJ, The number of free parameters is normal. I'm doing only 1-planet fitting. The derived parameters files (both quantile and detailed files) are there and saved from the "derive" command.

I'm also running for other datasets as well but didn't run into this issue.

zhexingli commented 3 years ago

I just tested by reruning radvel on one dataset that had run before and has complete radvel results. It still works. No error returned. But going back to this new target, error occurs. Looks like it's data related issue?

bjfultn commented 3 years ago

Yeah, something to do with the data. Maybe names of instruments?

zhexingli commented 3 years ago

Hmm... I don't believe it's the instrument names.. I rerun the same data again with slightly different setup: one with neither linear trend nor curvature, one with trend but without curvature, and one with both trend and curvature. Only the case with curvature turned on returned the similar issue.

For another target, it has this issue even when both trend and curvature are turned off.

bjfultn commented 3 years ago

Do the posteriors look nice and Gaussian?

zhexingli commented 3 years ago

Yep looks good to me. I've seen fittings with way worse posteriors than the ones I'm dealing with now and still produced everything nicely...

bjfultn commented 3 years ago

Send me the setup file and data and I'll see if I can reproduce.

zhexingli commented 3 years ago

Thanks BJ, attached are the setup file and data for one of the targets that's having this issue. Both trend and curvature terms are turned off. Archive.zip

bjfultn commented 3 years ago

The problem appears to be the period going to negative values. I diagnosed this by looking at the attached MCMC trend plots.

I think that the data simply can not constrain the orbital period well enough. It will run if you add a HardBounds prior on per1 to keep it positive, but more and/or better data or external constraints on the ephemeris is really what you need here. The delta BIC over a flat line fit is only 4 so this isn't really a significant detection.

radvel_setup_trends.pdf radvel_setup_results.pdf

zhexingli commented 3 years ago

Thank you BJ for looking into this. With your suggestions of adding HardBounds preventing it searching negative periods, it's now working (for this and another target as well). You're right this is an extremely week detection and the data we have in hand is probably not able to constrain it very well. Thanks!