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
706 stars 400 forks source link

RVZ_ERROR field is only giving the first digit of the radial velocity error #960

Closed DouglasBoubert closed 7 years ago

DouglasBoubert commented 7 years ago

When using astroquery.simbad the RVZ_ERROR field has units of km/s but has type unicode1, so is only returning the first digit of the radial velocity error. Please can this be fixed?

bsipocz commented 7 years ago

Could you provide a minimal example code?

DouglasBoubert commented 7 years ago

See below. The true error is 4.6 km/s, but this returns the string '4'.

from astroquery.simbad import Simbad s = Simbad() s.add_votable_fields('velocity') result_table = s.query_object('GSC0403601718') print(result_table['RVZ_RADVEL'][0],result_table['RVZ_ERROR'][0])

bsipocz commented 7 years ago

The issue is that the result votable comes back without datatype set for RVZ_ERROR: http://simbad.u-strasbg.fr/simbad/sim-script?submit=submit+script&script=votable+%7Bmain_id%2Ccoordinates%2Cvelocity%7D%0D%0Avotable+open%0D%0Aquery+id++GSC0403601718++%0D%0Avotable+close

@keflavich - is there someone in CDS we usually contact, or should I just drop a line to cds-question?

keflavich commented 7 years ago

I just contact the normal helpdesk. It's usually the same person helping, but they respond quickly to tickets.

aoberto commented 7 years ago

Hi,

I just added the missing fields

Anais

Le 01/08/2017 à 16:04, Brigitta Sipocz a écrit :

The issue is that the result votable comes back without |datatype| set for |RVZ_ERROR|: http://simbad.u-strasbg.fr/simbad/sim-script?submit=submit+script&script=votable+%7Bmain_id%2Ccoordinates%2Cvelocity%7D%0D%0Avotable+open%0D%0Aquery+id++GSC0403601718++%0D%0Avotable+close

@keflavich https://github.com/keflavich - is there someone in CDS we usually contact, or should I just drop a line to |cds-question|?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/astropy/astroquery/issues/960#issuecomment-319379451, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFaBf45DHRSwVp92KkBOIq68QMv36DYks5sTzBjgaJpZM4OoN94.

bsipocz commented 7 years ago

@aoberto - thanks you very much for the fix. I can confirm that the snippet above indeed works now as expected.

@DouglasBoubert - make sure you clear the relevant cache (usually located ~/.astropy/cache/astroquery), if it's around you may still see the previous result.

DouglasBoubert commented 7 years ago

@bsipocz - I can also confirm that it works as expected. Thank you for the quick fix!