Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jchate6 authored Jun 21, 2024
1 parent 24b340c commit dd67634
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions simbad2k/simbad2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ def get_result(self):
schemes = [*self.scheme_mapping]
for scheme in schemes:
for query_param in self.query_params_mapping[scheme]:
# astroquery has a very robust matching algorythm for "number" and will return elements for
# asteroid #2000 if you ask for "2000 JD1". We do not want to ask for a number when our object name
# is actually a preliminary designation.
# Numbered objects will not have a designation.
# Comets will have letters in their "numbers" i.e. 12P.
if query_param == 'number' and self.scheme_mapping[scheme] == 'asteroid':
try:
params = {'target_type': self.scheme_mapping[scheme], query_param: int(self.query)}
Expand Down

0 comments on commit dd67634

Please sign in to comment.