-
-
Notifications
You must be signed in to change notification settings - Fork 423
Switching to use VOtable format for XMatch #1375
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1375 +/- ##
==========================================
- Coverage 64.20% 64.19% -0.01%
==========================================
Files 130 130
Lines 16892 16881 -11
==========================================
- Hits 10845 10837 -8
+ Misses 6047 6044 -3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
If we know in advance which columns are going to be returned by xmatch, we can modify the user's input columns by adding a preceding |
@keflavich - I felt that hacking around like that will be messier. Also, how would we know what are the columns? Do a dummy query? I would also prefer to change the column names in the remote catalog than in the user's given the latter was provided by the user so will be more less intuitive to get the names changed. Or you mean to change the name, upload and then hack back the names before returning the results to the user? |
It's OK to have some of these hacks in astroquery. You're right that adding |
OK, let's do that hack instead, I'll try to get back to it in the evening. |
I am not sure it is properly documented, but you can know in advance the column names of the VizieR table you are xmatching using the following URL (example for WISE with a JSON output): |
Thanks @fxpineau for the info. I have a WIP hack locally, will see which approach provides a cleaner solution. |
bf50908
to
2a7f88a
Compare
/rebase |
there are some votable related discussions going on triggered by changes (and test failures) here, so I would simply postpone to finish this off in the next release. (note: the bug this aimed to address has already been fixed, so this PR now is a pure enhancement only to switch to use a votable return rather than the current csv) |
2a7f88a
to
04d2f18
Compare
The snippet from above works now without this PR, but switching to VOTable based return has been raised since then (e.g. #1777), so it maybe still worth rebasing and fixing up this PR. |
e480200
to
3813328
Compare
Co-authored-by: Adam Ginsburg <[email protected]>
193e1d6
to
47d993e
Compare
Edit: to close #1777
As the reader for the csv format cannot handle column duplications (that is quite likely as both users and catalogues can name their RA/DEC columns as RA/DEC, and there is no renaming on the server side). Until astropy solves this for the ascii reader, and we require that version as minimum version we need to have a workaround.
Here is a failing example:
The downside of this PR that the votable will remove also columns that are totally fine otherwise (e.g. _2MASS in the example in the current docs)