Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for Orbit.from_body_ephem(Pluto) #612

wants to merge 1 commit into
base: master


None yet
3 participants
Copy link

commented Mar 18, 2019

as per issue #401
I have changed the error message which appear when Orbit.from_body_ephem(Object) runs with the name of the Object which is not there in the selected Ephemeris

such as pluto is not there in the default ephemeris,
so now it shows the following error message
KeyError - Wrong ephemeris selected, cannot load Pluto data, as Pluto is not a part of selected ephemeris. Do run this command before calling from_body_ephem ------> solar_system_ephemeris.set ('XXXXX') ------> where XXXXX contains the ephemeris having Pluto as one of its objects"

pls review #401


This comment has been minimized.

Copy link
Contributor Author

commented Mar 18, 2019

its same as pull request #607
again attaching because by mistake, deleted the whole repo from my ID


This comment has been minimized.

Copy link

commented Mar 18, 2019

Codecov Report

Merging #612 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #612      +/-   ##
+ Coverage   85.03%   85.05%   +0.01%     
  Files          51       51              
  Lines        2386     2388       +2     
  Branches      183      184       +1     
+ Hits         2029     2031       +2     
  Misses        308      308              
  Partials       49       49
Impacted Files Coverage Δ
src/poliastro/twobody/ 90.24% <100%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b457cda...e3e1a27. Read the comment docs.


if ( == "Pluto"

This comment has been minimized.

Copy link

jorgepiloto Mar 19, 2019


Thanks for the PR @Himanshu-Garg. As said in #401, for the case of the Moon same happens and therefore some message should be raised. The problem is that 'Moon' is included in both astropy ephemerides: builtin and de432s. So therefore, here is my code suggestion:

Suggested change == "Pluto" == "Moon"
or not in solar_system_ephemeris.bodies

This comment has been minimized.

Copy link

commented Mar 29, 2019

@Himanshu-Garg are you still working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.