Skip to content

Incorrect Classification of Names.asteroid_or_comet #421

@noedgemoonwind

Description

@noedgemoonwind

The Names.asteroid_or_comet() function incorrectly classifies asteroid names as comet when Unpacked Provisional Designations of the asteroid does not contain any space.

For example,

>>> import sbpy
>>> sbpy.__version__
'0.5.0'
>>> from sbpy.data import Names
>>> Names.asteroid_or_comet('2015 XN77')
'asteroid'
>>> Names.asteroid_or_comet('2015XN77')
'comet'

2015XN77 is a invalid designation, the function should raise a TargetNameParseError to indicate that the input cannot be parsed. Or it might be better to classify Unpacked Provisional Designations that does not contain any space like 2015XN77 as asteroid, considering the program's robustness and possible usage scenarios.

sbpy version: 0.5.0
astropy version: 6.1.0

Thank you very much for your attention to this issue.

Metadata

Metadata

Assignees

Labels

potential bugautomated label to indicate issue reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions