astroquery
astroquery copied to clipboard
astroquery.jplhorizons.Horizons() multiple asteroid coordinates
Is there a way to request the position of multiple asteroids at a single time with one (or two) Horizons() calls? The documentation seems to imply the id kwarg only supports exact string matches, and not wildcards.
https://astroquery.readthedocs.io/en/latest/jplhorizons/jplhorizons.html#overview
After an email, I was directed to try using the API https://ssd.jpl.nasa.gov/tools/sb_ident.html#/ which I will attempt next.
cc @mkelley
supporting wildcard searches came up in the past, so there seems to be a definite demand, so I don't see why we shouldn't support it, and as this issues title suggest, maybe vectorized queries of exact ids could be supported, too.
I tried the sb_ident API above, and it works pretty good. You have to specify a maximum visual magnitude limit, otherwise you can get a large (several thousand?) number of asteroids, and the API response time I think scales with the number of asteroids it has to calculate trajectories for.
From my understanding of https://ssd-api.jpl.nasa.gov/doc/horizons.html#command the Horizons API only supports ephemerides/vectors/etc from single object queries. Wildcards and the like will return a list of object matches, essentially prompting the user to be more specific.