California-Planet-Search / radvel

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

Fix eccentricity prior when num_planets is a list #348

Closed vandalt closed 3 years ago

vandalt commented 3 years ago

This fixes #347 by ensuring that npl, the variable used to make upperlims a list, is always an integer. If num_planets is a list and upperlims is a float, the length of num_planets is used to make a upperlims a list. The issue was that npl was set to the list itself when num_planets was a list, but was treated as an integer in the multiplication to make the upperlims list.

vandalt commented 3 years ago

@bjfultn, should I add an extra prior (EccentricityPrior([1])) in the priors test along with the fix ?

bjfultn commented 3 years ago

Yes please, the only thing better than PRs from the community is PRs that include new tests!

bjfultn commented 3 years ago

Make sure you pull over from next-release too so that you are up to date with changes already staged for release.

vandalt commented 3 years ago

I rebased on next-release and added the test.