Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cometary designations are not fully supported. #408

Open
mkelley opened this issue Aug 27, 2024 · 0 comments
Open

Cometary designations are not fully supported. #408

mkelley opened this issue Aug 27, 2024 · 0 comments
Labels
data potential bug automated label to indicate issue reports

Comments

@mkelley
Copy link
Member

mkelley commented Aug 27, 2024

Cometary designations are not fully supported:

In [22]: Names.to_packed("73P")
---------------------------------------------------------------------------
TargetNameParseError                      Traceback (most recent call last)
Cell In[22], line 1
----> 1 Names.to_packed("73P")

File /disks/data0/astro/Projects/sbpy/sbpy/data/names.py:194, in Names.to_packed(s)
    190             raise TargetNameParseError(
    191                 ('{} cannot be turned into a '
    192                  'packed number or designation').format(s))
    193 else:
--> 194     raise TargetNameParseError(
    195         ('{} cannot be turned into a '
    196          'packed number or designation').format(s))

TargetNameParseError: 73P cannot be turned into a packed number or designation

In [23]: Names.to_packed("P/2004 A1")
---------------------------------------------------------------------------
TargetNameParseError                      Traceback (most recent call last)
Cell In[23], line 1
----> 1 Names.to_packed("P/2004 A1")

File /disks/data0/astro/Projects/sbpy/sbpy/data/names.py:194, in Names.to_packed(s)
    190             raise TargetNameParseError(
    191                 ('{} cannot be turned into a '
    192                  'packed number or designation').format(s))
    193 else:
--> 194     raise TargetNameParseError(
    195         ('{} cannot be turned into a '
    196          'packed number or designation').format(s))

TargetNameParseError: P/2004 A1 cannot be turned into a packed number or designation

In [24]: Names.to_packed("C/2013 US10")
---------------------------------------------------------------------------
TargetNameParseError                      Traceback (most recent call last)
Cell In[24], line 1
----> 1 Names.to_packed("C/2013 US10")

File /disks/data0/astro/Projects/sbpy/sbpy/data/names.py:194, in Names.to_packed(s)
    190             raise TargetNameParseError(
    191                 ('{} cannot be turned into a '
    192                  'packed number or designation').format(s))
    193 else:
--> 194     raise TargetNameParseError(
    195         ('{} cannot be turned into a '
    196          'packed number or designation').format(s))

TargetNameParseError: C/2013 US10 cannot be turned into a packed number or designation

These examples should use the 12-character format at:

https://www.minorplanetcenter.net/iau/info/PackedDes.html

Take care to account for two characters in a comet fragment designation, at least for numbered periodic comets. The MPC's comet orbit table file packs 73P-BA into "0073P ba":

https://www.minorplanetcenter.net/iau/MPCORB/CometEls.txt

However, the packed format description doesn't account for two-character fragment specifiers, and following the 73P rule (fragment in columns 11 and 12) will not work for a provisional designation, which needs to use the 11th character. For this latter case, should we raise an error or make it a 13-character string and raise a warning?

@mkelley mkelley added potential bug automated label to indicate issue reports data labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data potential bug automated label to indicate issue reports
Projects
None yet
Development

No branches or pull requests

1 participant