exoplanet-dev / exoplanet

Fast & scalable MCMC for all your exoplanet needs!
https://docs.exoplanet.codes
MIT License
206 stars 52 forks source link

Unexpected behavior when using get_star_position() function #221

Closed dyahalomi closed 3 years ago

dyahalomi commented 3 years ago

Describe the bug I've been trying to use the get_star_position() function to obtain the barycentric position of a star due to orbiting exoplanets. I have been unable to make the get_star_position() function to return any non-zero results.

My planets are an Earth-like and Jupiter-like planet around a Sun-like star. I was able to get non-zero results when using the same orbits and the get_planet_position() function. I also tried increasing the period and mass of the planets in defining the orbits in order to increase the amplitude of the star's orbit, in case it was a rounding error, but also without success.

Perhaps I am misunderstanding something here, and any help would be greatly appreciated!

To Reproduce See attached file for code (as a .txt file). test_star_position.txt

Expected behavior I expected the function to return the barycentric position of the Sun-like star over time (in units of R_sun) due to the sum of the orbits of the Earth-like and Jupiter-like planets.

Your setup (please complete the following information):

Additional context

dfm commented 3 years ago

The parameter is called m_planet not m_p :D

It would be good to throw an error for unrecognized parameters though!

dyahalomi commented 3 years ago

Yeah that fixed it! Sorry for the false alarm and thanks!