mommermi/callhorizons

Automatic comet detection failing

Closed this issue · 0 comments

Hi Michael,

Automatic comet designation detection is failing because isasteroid thinks comet designations are comets:

    for desg in desgs:
        q = callhorizons.query(desg)
        print('{:12s} {:5s} {:5s}'.format(q.targetname, str(q.isasteroid()), str(q.iscomet())))
355P         True  True 
C/2010 U3    True  True 
C/2016 A1    True  True 
C/2016 R2    True  True 
C/2014 B1    True  True 
74P          True  True 
62P          True  True 
217P         True  True 
47P          True  True 
C/2017 S6    True  True 
60558        True  False
145P         True  True 
C/2015 V1    True  True 
90P          True  False
103P         True  False
C/2017 D3    True  True 
240P         True  False
C/2015 XY1   True  True 
C/2011 KP36  True  True 
C/2017 T1    True  True 
C/2015 ER61  True  True 
C/2016 T3    True  True 
3200         True  False
C/2017 T3    True  True 
C/2016 N6    True  True 

Within isasteroid is:

return any(self.parse_asteroid()) is not None

I tried instead

not all([a is None for a in self.parse_asteroid()])

But that fails for comets that were originally discovered as asteorids:

240P         False False
C/2015 ER61  True  True 
C/2016 A1    False True 
C/2015 XY1   True  True 
C/2016 T3    False True 
145P         False True 
C/2017 T1    False True 
74P          False True 
C/2017 S6    False True 
C/2016 R2    False True 
62P          False True 
103P         False False
C/2017 D3    False True 
C/2015 V1    False True 
C/2011 KP36  True  True 
60558        True  False
90P          False False
47P          False True 
C/2017 T3    False True 
355P         False True 
217P         False True 
3200         True  False
C/2010 U3    False True 
C/2014 B1    False True 
C/2016 N6    False True 
In [5]: q = callhorizons.query('C/2011 KP36')

In [6]: q.isasteroid()
Out[6]: True

In [7]: q.parse_asteroid()
Out[7]: ('2011 KP36', None, None)