IAU-ADES / ADES-Master

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

Failure when converting between packed and ADES-style designations for comets #36

Closed stevechesley closed 4 months ago

stevechesley commented 7 months ago

As noted in PR #34, there are problems with converting to/from packed comet designations. This affects the functionality of mpc80coltoxml.py and xmltompc80col.py for comet data.

From notes in PR #34:

Note that some of the examples for comets fail: e.g. J94P010 = 1994 P1 according to the MPC website, but our code converts this as A/1994 P1. Additionally, the existing code fails to match and convert J94P01b at all (to 1994 P1-B).

This is in manifested in a number of failures in test_packUtil.py:

FAILED test_packUtil.py::test_unpack_provID_examples[J95A010-1995 A1] - AssertionError: assert 'A/1995 A1' == '1995 A1'
FAILED test_packUtil.py::test_unpack_provID_examples[J94P01b-1994 P1-B] - AssertionError: assert None == '1994 P1-B'
FAILED test_packUtil.py::test_unpack_provID_examples[J94P010-1994 P1] - AssertionError: assert 'A/1994 P1' == '1994 P1'
FAILED test_packUtil.py::test_unpack_provID_examples[K48X130-2048 X13] - AssertionError: assert 'A/2048 X13' == '2048 X13'
FAILED test_packUtil.py::test_unpack_provID_examples[K33L89c-2033 L89-C] - AssertionError: assert None == '2033 L89-C'
FAILED test_packUtil.py::test_unpack_provID_examples[K88AA30-2088 A103] - AssertionError: assert 'A/2088 A103' == '2088 A103'
FAILED test_packUtil.py::test_pack_provID_examples[J95A010-1995 A1] - RuntimeError: invalid provID 1995 A1
FAILED test_packUtil.py::test_pack_provID_examples[J94P01b-1994 P1-B] - RuntimeError: invalid provID 1994 P1-B
FAILED test_packUtil.py::test_pack_provID_examples[J94P010-1994 P1] - RuntimeError: invalid provID 1994 P1
FAILED test_packUtil.py::test_pack_provID_examples[K48X130-2048 X13] - RuntimeError: invalid provID 2048 X13
FAILED test_packUtil.py::test_pack_provID_examples[K33L89c-2033 L89-C] - RuntimeError: invalid provID 2033 L89-C
FAILED test_packUtil.py::test_pack_provID_examples[K88AA30-2088 A103] - RuntimeError: invalid provID 2088 A103
stevechesley commented 4 months ago

Fixed in PR #53, where the tests were changed to include the leading character (e.g., A/, C/, P/. X/, D/).