Skip to content

Conversation

@Kraysent
Copy link

@Kraysent Kraysent commented Nov 14, 2025

Hi!

Problem

Found a bug: when trying to download a table from Vizier using get_catalogs_async method (and get_catalogs as a consequence) the resulting table only contains UCD1 identifier instead of UCD1+. This is a bug and not a backwards compatibility feature because the comment in the code explicitly states that it wants to download newer version: https://github.com/astropy/astroquery/blob/main/astroquery/vizier/core.py#L691

This results in a VOTable that only has older UCD1 syntax:

   <FIELD ID="RAJ2000" arraysize="13" datatype="char" name="RAJ2000" ucd="POS_EQ_RA_MAIN" xtype="hms">
    <DESCRIPTION>
     Right ascension in ICRS, at "Epoch" (1)
    </DESCRIPTION>
   </FIELD>

Instead of a UCD1+ one might expect:

   <FIELD ID="RAJ2000" arraysize="13" datatype="char" name="RAJ2000" ucd="pos.eq.ra;meta.main" xtype="hms">
    <DESCRIPTION>
     Right ascension in ICRS, at "Epoch" (1)
    </DESCRIPTION>
   </FIELD>

Code to reproduce:

from astroquery import vizier
catalogs = vizier.Vizier().get_catalogs("I/273A/erlcat")
tbl = catalogs[0]
tbl.write("test.vot", format="votable")

Solution

As UCD1+ is a newer syntax, I propose we just use it. To do that, as per Vizier spec, we only need to remove the U identifier from -out.meta parameter that requests the data, see the diff in this PR.

Potential compromises

This technically breaks backwards compatibility. As an alternative, we may pass some parameter to VizierClass instance that will query either new or old UCD syntax and which will default to old syntax. Not sure if this is necessary, though, as UCD1 was superseded by UCD1+ in 2005: https://www.ivoa.net/documents/REC/UCD/UCD-20050812.html

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.72%. Comparing base (91fad25) to head (7a4138d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3458   +/-   ##
=======================================
  Coverage   70.72%   70.72%           
=======================================
  Files         232      232           
  Lines       20041    20041           
=======================================
  Hits        14174    14174           
  Misses       5867     5867           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bsipocz
Copy link
Member

bsipocz commented Nov 14, 2025

Cc @ManonMarchand

@ManonMarchand
Copy link
Member

ManonMarchand commented Nov 17, 2025

Hello,

Thanks for looking into this!

You're right, the default should be UCD1+ (and it's what is in the database anyhow so we avoid a conversion).
I think this deserves a changelog entry in the breaking change section though.

@bsipocz bsipocz added this to the 0.4.12 milestone Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants