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

Units should be parsed in the nasa_exoplanet_archive module #2130

Closed
bsipocz opened this issue Aug 5, 2021 · 3 comments · Fixed by #2218
Closed

Units should be parsed in the nasa_exoplanet_archive module #2130

bsipocz opened this issue Aug 5, 2021 · 3 comments · Fixed by #2218

Comments

@bsipocz
Copy link
Member

bsipocz commented Aug 5, 2021

One of the test cases raises a lot of warnings for unrecognized units. These should be instead handled internally in the module.

from astroquery.nasa_exoplanet_archive import NasaExoplanetArchive
from astropy.coordinates import SkyCoord
import astropy.units as u

coords = SkyCoord(ra=330.79488 * u.deg, dec=18.8843 * u.deg)
radius = 0.001
NasaExoplanetArchive.query_region("pscomppars", coords, radius * u.deg)
WARNING: Unrecognized unit: 'day' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'Searth' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'Rjupiter' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'Rearth' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'Mjupiter' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'Mearth' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'log(Lsun)' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
WARNING: Unrecognized unit: 'log(cm/s**2)' [astroquery.ipac.nexsci.nasa_exoplanet_archive.core]
<QTable masked=True length=1>
  pl_name   pl_letter  hostname  hd_name  ...          y                   z            htm20          sky_coord       
                                          ...                                                           deg,deg        
   str11       str1      str9      str9   ...       float64             float64         int32           SkyCoord       
----------- --------- --------- --------- ... -------------------- ------------------ ---------- ----------------------
HD 209458 b         b HD 209458 HD 209458 ... -0.46167208441073987 0.3236572034047644 1553919534 330.7950219,18.8842419
@bsipocz
Copy link
Member Author

bsipocz commented Aug 5, 2021

Another test query raises a warning for day as well.

NasaExoplanetArchive.query_object("HAT-P-11 b")

@bsipocz
Copy link
Member Author

bsipocz commented Oct 5, 2021

cc @rickynilsson. I've been fixing some other issues, and run into these again, I suppose it's a quick fix to _fix_units(). I'm just not sure you've seen this GH issue. Shall I assign this to you here, or do you prefer a Jira ticket instead?

@rickynilsson
Copy link
Contributor

@bsipocz - you can assign it to me here. I think you are right that it should be a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants