astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

astroquery.jplhorizons.Horizons() multiple asteroid coordinates

Open nkelhos opened this issue 1 year ago • 4 comments

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

nkelhos avatar Jan 01 '24 22:01 nkelhos

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.

nkelhos avatar Jan 02 '24 22:01 nkelhos

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.

bsipocz avatar Jan 05 '24 21:01 bsipocz

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.

nkelhos avatar Jan 07 '24 21:01 nkelhos

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.

mkelley avatar Jan 11 '24 16:01 mkelley