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

Feature request: ability to query by comet ID #675

Open
ColinOrionChandler opened this issue Sep 27, 2024 · 2 comments
Open

Feature request: ability to query by comet ID #675

ColinOrionChandler opened this issue Sep 27, 2024 · 2 comments
Labels

Comments

@ColinOrionChandler
Copy link

Would like to be able to query by comet ID, such as 282P (which is also 323137 or 2003 BM80), for example.

@JulienPeloton JulienPeloton transferred this issue from astrolabsoftware/fink-broker Oct 21, 2024
@JulienPeloton
Copy link
Member

Hello @ColinOrionChandler

Sorry for being so late to get back to you! Actually you can query by comet ID if ZTF reported it as such. More specifically:

  1. ZTF reports the closest small bodies (within 30 arcseconds -- and we restrict to 5 arcseconds to match meaningfully) to any alert. This information is stored inside the field ssnamenr.
  2. Under the hood, when a user makes a request by name or number, we resolve first the input using rocks to get all corresponding names and aliases, and then we look at matching ssnamenr(s) returned by ZTF.
  3. Unfortunately, rocks does not work with comets (yet). So the Fink code will directly look for a correspondence between the user input and the table of ssnamenr.

If ZTF reported the comet ID you are looking for directly in ssnamenr, the query will work (e.g. try 10P). But in the case of 282P, ZTF observed it, but reported it under the number 323137.

One thing I would like to do is that in the case of a comet ID, running quaero directly instead of rocks to resolve the name. I'll keep you in touch.

@JulienPeloton
Copy link
Member

JulienPeloton commented Oct 22, 2024

Hum, unfortunately I do not know how to do it properly. For example, in the case of 282 it is sort of easy:

import requests

r = requests.get("https://api.ssodnet.imcce.fr/quaero/1/sso?q=282P&type=Comet")
print(r.json()["data"])
[{'id': '282P',
  'name': '282P',
  'type': 'Comet',
  'parent': 'Sun',
  'system': 'Sun',
  'ephemeris': True,
  'physical-ephemeris': False,
  'updated': '2024-10-07',
  'class': ['Short-period', 'Jupiter-family'],
  'aliases': ['P/2003 BM80'],
  'title': '282P/2003 BM80',
  'links': {'self': 'https://api.ssodnet.imcce.fr/quaero/1/sso/282P'}}]

from the aliases one can extract 2003 BM80. But take now 10P for example:

[{'id': '10P',
  'name': '10P',
  'type': 'Comet',
  'parent': 'Sun',
  'system': 'Sun',
  'ephemeris': True,
  'physical-ephemeris': False,
  'updated': '2024-10-07',
  'class': ['Short-period', 'Jupiter-family'],
  'aliases': ['P/1878 III',
   'P/1878 O1',
   'P/1878b',
   'P/1894 III',
   'P/1894c',
   'P/1899 IV',
   'P/1899c',
   'P/1904 III',
   'P/1904c',
   'P/1915 I',
   'P/1915c',
   'P/1920 II',
   'P/1920a',
   'P/1925 IV',
   'P/1925d',
   'P/1930 VII',
   'P/1930f',
   'P/1946 III',
   'P/1946b',
   'P/1951 VIII',
   'P/1951d',
   'P/1956e',
   'P/1957 II',
   'P/1961b',
   'P/1962 VI',
   'P/1967 X',
   'P/1967d',
   'P/1972 X',
   'P/1972c',
   'P/1977d',
   'P/1978 V',
   'P/1982d',
   'P/1983 X',
   'P/1987g',
   'P/1988 XIV',
   'P/1994 VII',
   'P/Tempel'],
  'title': '10P/Tempel',
  'links': {'self': 'https://api.ssodnet.imcce.fr/quaero/1/sso/10P'}}]

First there are many more aliases, and one cannot blindly search for them as for example Tempel is also an asteroid :-(

I'm not sure how to proceed in that case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

2 participants