astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Bug in units for NASA Exoplanet Archive results

Open bmorris3 opened this issue 1 year ago • 8 comments

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

bmorris3 avatar Feb 13 '24 15:02 bmorris3

cc @rickynilsson

bsipocz avatar Feb 15 '24 03:02 bsipocz

I'll look into this.

rickynilsson avatar Feb 15 '24 18:02 rickynilsson

Any updates? Thanks!

bmorris3 avatar Apr 08 '24 14:04 bmorris3

Any updates? Thanks!

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

rickynilsson avatar Apr 09 '24 21:04 rickynilsson

Friendly reminder @rickynilsson.

bmorris3 avatar Apr 23 '24 11:04 bmorris3

@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.

rickynilsson avatar Apr 25 '24 00:04 rickynilsson

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

rmhuch avatar Jul 24 '24 20:07 rmhuch

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

rickynilsson avatar Jul 24 '24 21:07 rickynilsson