astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Unexpected warning when trying to query catalog

Open astrofrog opened this issue 3 years ago • 1 comments

I haven't had time to dig further into this, but got a strange warning when trying to do a simple query:

from astroquery.vizier import Vizier
result = Vizier(catalog='IV/38/tic').query_constraints(TIC='1402786096')
WARNING: UnitsWarning: Unit 'Sun' not supported by the VOUnit standard. Did you mean uN? [astropy.units.format.vounit]
WARNING:astroquery:UnitsWarning: Unit 'Sun' not supported by the VOUnit standard. Did you mean uN?

astrofrog avatar Aug 05 '22 09:08 astrofrog

Looks like this is supposed to be a unit referring to "solar metallicity"

from astroquery.vizier import Vizier
result = Vizier(catalog='IV/38/tic').query_constraints_async(TIC='1402786096')
print(result.text.split("\n")[97:102])
['    <FIELD name="[M/H]" ucd="PHYS_ABUND_Z" datatype="double" width="7" precision="4" unit="log(Sun)">', '      <DESCRIPTION>[-4.7/1.4]? Metallicity (M/H) (17)</DESCRIPTION>', '      <VALUES null="NaN" />', '    </FIELD>', '    <FIELD name="e_[M/H]" ucd="ERROR" datatype="float" width="7" precision="4" unit="log(Sun)">']

(see "log(Sun)" above)

This might be an upstream issue. I'm not sure what the VO standard has to say about it.

keflavich avatar Aug 05 '22 13:08 keflavich

The bug is upstream in astropy, the linked PR should solve it

ManonMarchand avatar Jan 10 '24 08:01 ManonMarchand