astroquery
astroquery copied to clipboard
Nasa Exoplanet Archive query_aliases fails for multiple star systems
When trying to request data from the NASA Exoplanet Archive, the alias resolution fails for multiple star systems like LTT1445 or Alpha Centauri, even if specifying the specific star in the system.
Example:
from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive
alias_ltt = NasaExoplanetArchive.query_aliases("LTT1445A")
alias_alf = NasaExoplanetArchive.query_aliases("Alf Cen A")
Output:
WARNING: NoResultsWarning: No aliases found for name: 'LTT1445A' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: NoResultsWarning: No aliases found for name: 'Alf Cen A' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
I think the problem lies in line 404 of core.py:
other_objnames = list(set(data['system']['objects']['stellar_set']['stars'][default_objname[0]]['alias_set']['aliases']) - set(default_objname))
Since default_objname[0] does not include the letter of the star, but it is expected in the dictionary.
cc @rickynilsson