astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
695 stars 396 forks source link

Bug in units for NASA Exoplanet Archive results #2949

Open bmorris3 opened 7 months ago

bmorris3 commented 7 months ago

Using astroquery 0.4.7.dev9069, I ran into an incorrect unit in the NASA Exoplanet Archive module today:

>>> from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive as NEA

>>> result = NEA.query_object('K2-141 b')

>>> result['pl_trandur']
[  nan   nan   nan 0.868 0.94 ] d

The pl_trandur column is the transit duration, noted as "T_14" on the rendered webpage, with units of hours (fifth row from the bottom):

Screen Shot 2024-02-13 at 10 00 39

I dug into the source and I'm not sure why it doesn't work with the existing logic. I also checked that the Exoplanet Archive table claims units of hours, and it does. Should we put a one-off fix for this column in _fix_units, here?

https://github.com/astropy/astroquery/blob/ab7fdaa48b7197df781671ce34a03527269bef4b/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py#L534-L535

Related to: #2130, #2218

bsipocz commented 7 months ago

cc @rickynilsson

rickynilsson commented 7 months ago

I'll look into this.

bmorris3 commented 5 months ago

Any updates? Thanks!

rickynilsson commented 5 months ago

Any updates? Thanks!

Thanks for the ping. I'll try to get to this when I'm back from eclipse travel later this week.

bmorris3 commented 4 months ago

Friendly reminder @rickynilsson.

rickynilsson commented 4 months ago

@bmorris3 - There seems to be an inconsistency in the units for Transit Duration in the Exoplanet Archive, which are in units of hours in the overviews and PS ICE table, but in units of days in the underlying db table (and hence in TAP queries used by astroquery's Exoplanet Archive module). As you say, it should be hours everywhere. I've brought it up with the team and we'll fix the unit in the underlying db as soon as possible. Thanks for bringing this to our attention.

rmhuch commented 1 month ago

Hi! I ran into this exact problem today.. wondering if there is an estimated timeline when this will be fixed? Thanks!

rickynilsson commented 1 month ago

Yeah, it's been fixed in dev and waiting for merge into production next week or so.