Coder Social home page Coder Social logo

Comments (4)

bsipocz avatar bsipocz commented on June 24, 2024 1

I would say this is upstream, the capitalization is coming directly from the server and astropy defaults to using ID. Ideally, the server should use the same capitalization independently of the format requested from it.
Why the difference within gaia and direct use of TapPlus is a bit of an enigma and would require more digging, I suppose the default output formats may differ, etc.

(In astropy, when both present ID is given preference over name (see the notes section in here: https://docs.astropy.org/en/stable/io/votable/index.html#examples) )

from astroquery.

bsipocz avatar bsipocz commented on June 24, 2024 1

OK, so a bit more digging:

If you use PyVO for the direct TAP query, you get the lower case column name, but in the repr, and only because we have specifically set use_names_over_ids=True when converting the VOTable to an astropy Table (that we also use for printing the repr). The fieldnames property is also populated by looping through the field names rather than the ID.

Anyway, I also found the difference between calling the module and TapPlus. You have used a different server_context. You used 'data-server' while the module uses 'tap-server', changing your example to use tap-service would result in the same all caps column name.

So with this, the horse is beaten dead, and I will close this issue as upstream.

If @cosmoJFH or others at ESA think that we should work around this, it's their decision and I'll merge their PR that would either opt in use_names_over_ids or switching the context, or something else.

from astroquery.

cosmoJFH avatar cosmoJFH commented on June 24, 2024

Hi @adrn, here you have my 2 cents: if you download the results as a votable (job = Gaia.launch_job(query,dump_to_file=True)) you can find the following

image

Could it be that the column name is read from the 'ID' instead of from the 'name'?

I am not an expert in astropy, but I found the following method in votable/connect/read_table_votable

image

from astroquery.

adrn avatar adrn commented on June 24, 2024

That makes sense -- thanks @bsipocz and @cosmoJFH for digging into this!

from astroquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.