-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vizier query for columns with underscore in name #3124
Comments
The return from Vizier is correct:
and as far as I can tell, this renaming is happening in the astropy votable parser. |
Thanks. That is starting to make a bit of sense. Using the the r'mag name gives me a workaround for now. As a bit of background, there seem to have been some changes on the formatting of this database not long ago. For years I had code running that used "r_mag" on Vizier APASS searches. In January this year that stopped working and I modified the code to use "r'mag" as you mention. That worked until last week, when that too stopped working. I have not been able to get to the bottom of whether the changes were in astroquery or the database endpoint on Vizier. As you demonstrate, "r'mag" is working again for me now, so I can use that for the time being. And then, on my second example in the original question, the Tycho catalogue had 'RA_ICRS_', 'DE_ICRS_' for the RA and DEC. Looking on Vizier itself, they actually use "RA(ICRS)" and "DEC(ICRS)". I just tested and I can indeed run searches for those if I just use the parentheses.
It therefore looks like multiple problematic special characters are getting mapped to underscore. You can still retrieve the values by checking the underlying column name on Vizier, but as you say it is probably 'unexpected behaviour' |
My original question title seems potentially misleading now that you have spotted the true problem. Would it be good practice for me to edit the question title or is it best left as is? The real issue seems to relate to column names in Vizier that contain any punctuation marks. |
@keflavich - Would you mind either reporting it upstream with a self-contained example or should we just move this same issue? |
Hi all, I checked the history of these catalogs and the column names did not change in VizieR. The only instruction I could find in the VOtable standard is that column names should not start with a number, and can contain any unicode character. I don't think VizieR is doing anything wrong here. |
Thanks @ManonMarchand, good to know this is allowed. @bsipocz I think this needs to become an astropy votable issue. We'll need an appropriate MWE; if I can find 20m, I'll do that, but probably after Nov 15 |
I am unable to get catalogue queries to work on Vizier for columns which contain an underscore. I know I have done it in the past, so I must be doing something daft now. In fact I have the code that used to work about a year or so ago. It still runs, but simply ignores columns that contain an underscore in the name.
Here are a couple of examples on two different catalogues.
The results say three columns where I asked for four. It includes the Vmag data, but not the r_mag.
And a similar query on Tycho, for which the RA,DEC have underscores in their name.
Which returns the following. The table includes only two columns for the two magnitudes. No RA,DEC.
The text was updated successfully, but these errors were encountered: