Skip to content

Commit

Permalink
Merge pull request poliastro#1409 from Yash-10/astroquery-default-change
Browse files Browse the repository at this point in the history
Resolving astroquery deprecation warnings
  • Loading branch information
astrojuanlu authored Nov 29, 2021
2 parents 3ee0c18 + 581cc7c commit 4962a4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/poliastro/ephem.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,13 @@ def from_horizons(
*,
attractor=None,
plane=Planes.EARTH_EQUATOR,
id_type="smallbody",
id_type=None,
):
"""Return `Ephem` for an object using JPLHorizons module of Astroquery.
Parameters
----------
name : string
name : str
Name of the body to query for.
epochs: ~astropy.time.Time
Epochs to sample the body positions.
Expand All @@ -262,9 +262,9 @@ def from_horizons(
if not given the Solar System Barycenter will be used.
plane : ~poliastro.frames.Planes, optional
Fundamental plane of the frame, default to Earth Equator.
id_type : str, optional
Use "smallbody" for Asteroids and Comets (default), and "majorbody"
for Planets and Satellites.
id_type : NoneType or str, optional
Use "smallbody" for Asteroids and Comets and None (default) to first
search for Planets and Satellites.
"""
if epochs.isscalar:
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_twobody/test_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ def test_can_set_iss_attractor_to_earth():
# See https://github.com/poliastro/poliastro/issues/798
epoch = Time("2019-11-10 12:00:00")
ephem = Ephem.from_horizons(
"International Space Station", epochs=epoch, attractor=Sun, id_type="majorbody"
"International Space Station", epochs=epoch, attractor=Sun, id_type=None
)
iss = Orbit.from_ephem(Sun, ephem, epoch)
iss = iss.change_attractor(Earth)
Expand Down

0 comments on commit 4962a4c

Please sign in to comment.