Closed monocongo closed 2 years ago
This is a problem with the MPC tool upon which the sbpy-astroquery chain is based. I tried 2008 JG at https://minorplanetcenter.net/iau/MPEph/MPEph.html and got back:
No current elements found for 2008 JG. There may be published elements for this object; if there are, it is probably meaningless to make a current prediction of the basis of them. However, when this object is identified/recovered/rediscovered, elements will be available here. If the designation refers to a recently designated object, ephemerides will generally be available on the day following assignment of the designation.
However, the MPC orbit database has an orbit for this year, so I don't understand why it reports "no current elements": http://www.minorplanetcenter.net/db_search/show_object?object_id=613986
Regardless, it seems the astroquery error message could be improved to help diagnose issues like this.
I have re-posted this issue on the astroquery project. Thanks for the attention to this issue and guidance.
High-level problem description There are many objects for which there are observations in the MPC dataset but when I use the Obs class to query for these I get errors indicating that I've used an invalid designation.
For example:
However the designations can be used successfully to retrieve orbit and observations from the MPC database search tool (see this), so it seems that either Obs.from_mpc or the wrapped astroquery.mpc.MPCClass.get_observations is where the designation is somehow being mangled before passing it off to the MPC search tool, if that's in fact what's going on here.
What did you do? I've used the
Obs.from_mpc
function to successfully retrieve observations for around 300 objects, but I get errors for another ~2000 objects. For example, the following unpacked designations have been used which give the below error:suspect_designations = [ '2008 JG', '2008 TY9', '2018 SG3', '2020 QD4', '2016 ND1', '2020 VN1', '2011 HN5', ]
The code below will cause the error when run in a Jupyter notebook cell:
What did you expect? I expected to get the MPC observations for the object, as shown in the example below which is the result when using the designation '2010 JR34'
What did really happen?
Provide information on your environment: operating system and version: Linux Kubuntu 21.10 sbpy version: latest from GitHub astropy version: 5.1 numpy version: 1.23.0