astroquery
astroquery copied to clipboard
Unexpected warning when trying to query catalog
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?
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.
The bug is upstream in astropy, the linked PR should solve it