IAU-ADES / ADES-Master

ADES implementation based on a master XML file
26 stars 7 forks source link

New Packed Formats #31

Closed matthewjohnpayne closed 7 months ago

matthewjohnpayne commented 9 months ago

It would be good to accommodate the new packed designation schemes for both the permIDs and the provIDs.

N.B. These get used within the xmltompc80col.py & mpc80coltoxml.py codes

Further, I'm wondering whether we could add an option to silently continue (and not error-out) in some circumstances.

stevechesley commented 9 months ago

Agreed. Will look to update xmltompc80col.py and mpc80coltoxml.py in the near future.

Just including packing schemes here for reference: Asteroid numbers Provisional designations

stevenstetzler commented 8 months ago

I opened #34 for this. As far as I can tell, permIDs starting with ~ are matched and handled via packUtil.minorplanetPackedIDRegex and packUtil.unpackPackedID and packUtil.packTupleID. The code I found commented out:

#minorplanetPackedPermIDRegex = re.compile('^([0-9A-Za-z])(\d{4})$')
...
#minorplanetPackedProvIDRegex = re.compile('^ ([I-K])(\d{2})([A-HJ-Y])([a-zA-Z0-9])(\d)([A-HJ-Z])$')

isn't used elsewhere.

Packing and unpacking of provIDs seems to be handled already except for using the extended packed format, which I've implemented in the PR.