{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astroquery/issues/733","repository_url":"https://api.github.com/repos/astropy/astroquery","labels_url":"https://api.github.com/repos/astropy/astroquery/issues/733/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astroquery/issues/733/comments","events_url":"https://api.github.com/repos/astropy/astroquery/issues/733/events","html_url":"https://github.com/astropy/astroquery/issues/733","id":172265737,"number":733,"title":"Provide catalogue number for a target","user":{"login":"ceyzeriat","id":7918290,"avatar_url":"https://avatars.githubusercontent.com/u/7918290?v=3","gravatar_id":"","url":"https://api.github.com/users/ceyzeriat","html_url":"https://github.com/ceyzeriat","followers_url":"https://api.github.com/users/ceyzeriat/followers","following_url":"https://api.github.com/users/ceyzeriat/following{/other_user}","gists_url":"https://api.github.com/users/ceyzeriat/gists{/gist_id}","starred_url":"https://api.github.com/users/ceyzeriat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceyzeriat/subscriptions","organizations_url":"https://api.github.com/users/ceyzeriat/orgs","repos_url":"https://api.github.com/users/ceyzeriat/repos","events_url":"https://api.github.com/users/ceyzeriat/events{/privacy}","received_events_url":"https://api.github.com/users/ceyzeriat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-20T10:56:24Z","updated_at":"2016-08-21T22:41:25Z","closed_at":null,"body":"I had a look at the guts of the code, but can't really find what's the best place to put this, so I open an issue/improvement instead.\r\n\r\nWhen one queries a target through a name, e.g. \"vega\", it is often useful to access its catalog numbers to cross reference it with other sources, e.g. for vega HR 7001, HIP 91262, HIC 91262, HD 172167 for the most famous ones for stars. Ideally, it could work for any catalog (messier, WLY, NGC, 2MASS, ...), and even return the \"constellation name of the star\", e.g. \"Alpha Lyrae\" for vega.\r\n\r\nI know Simbad keeps track of most catalog numbers/names for a target, which are querried with `query_objectids`. A way to implement this would be to create a dictionary of `{'catalog_short_name': catalogue_number_or_string}` from the result of the `query_objectids` method.\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/astropy/astroquery/issues/comments/241286965","html_url":"https://github.com/astropy/astroquery/issues/733#issuecomment-241286965","issue_url":"https://api.github.com/repos/astropy/astroquery/issues/733","id":241286965,"user":{"login":"ceyzeriat","id":7918290,"avatar_url":"https://avatars.githubusercontent.com/u/7918290?v=3","gravatar_id":"","url":"https://api.github.com/users/ceyzeriat","html_url":"https://github.com/ceyzeriat","followers_url":"https://api.github.com/users/ceyzeriat/followers","following_url":"https://api.github.com/users/ceyzeriat/following{/other_user}","gists_url":"https://api.github.com/users/ceyzeriat/gists{/gist_id}","starred_url":"https://api.github.com/users/ceyzeriat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceyzeriat/subscriptions","organizations_url":"https://api.github.com/users/ceyzeriat/orgs","repos_url":"https://api.github.com/users/ceyzeriat/repos","events_url":"https://api.github.com/users/ceyzeriat/events{/privacy}","received_events_url":"https://api.github.com/users/ceyzeriat/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T22:41:25Z","updated_at":"2016-08-21T22:41:25Z","body":"VizieR says there are 14000+ catalogs http://vizier.u-strasbg.fr/viz-bin/VizieR-2\r\n\r\nNot sure we should record catalog IDs, because anyway, it seems that the only way to get the catalog numbers is to parse strings.\r\n\r\nNote also that a dummy real-expression is able to extract correctly the different catalogs ID/numbers for the case of vega:\r\n```\r\nfrom astroquery.simbad import Simbad\r\nimport re\r\nfor i in Simbad.query_objectids('vega')['ID']:\r\n  print(\"%-35s : %10s : %s\"%((i,)+re.match('([^ \\-\\+]+) *(.+)$', i).groups()[0:2]))\r\n```\r\nto be compared to http://simbad.u-strasbg.fr/simbad/sim-basic?Ident=vega&submit=SIMBAD+search\r\n\r\nThe IDs just have to be cleaned a bit to become dict-keys, and the \"numbers\" converted to int when possible.. and that's it!\r\n"}}
{"actor":{"display_login":"ceyzeriat"}}